添加了bStats
All checks were successful
Java CI-CD with Maven / build (push) Successful in 8m28s

This commit is contained in:
zhangyuheng 2024-03-28 00:28:33 +08:00
parent 76edc1d146
commit a681fca1b9
5 changed files with 4 additions and 20 deletions

View File

@ -6,7 +6,7 @@
<groupId>cn.lunadeer</groupId>
<artifactId>LiteWorldEdit</artifactId>
<version>2.4.1.3</version>
<version>2.4.1.10</version>
<packaging>jar</packaging>
<name>LiteWorldEdit</name>

View File

@ -20,9 +20,7 @@ public final class LiteWorldEdit extends JavaPlugin {
Objects.requireNonNull(Bukkit.getPluginCommand("LiteWorldEdit")).setExecutor(new Commands());
Objects.requireNonNull(Bukkit.getPluginCommand("LiteWorldEdit")).setTabCompleter(new Commands());
if (config.enableBStats()) {
metrics = new Metrics(this, 21436);
}
Metrics metrics = new Metrics(this, 21436);
LoggerX.info("LiteWorldEdit 已加载");
LoggerX.info("版本: " + getPluginMeta().getVersion());
@ -54,5 +52,4 @@ public final class LiteWorldEdit extends JavaPlugin {
public static LiteWorldEdit instance;
public static ConfigManager config;
private Cache _cache;
private Metrics metrics;
}

View File

@ -18,7 +18,6 @@ public class ConfigManager {
_z_max = _file.getInt("MaxZ", 64);
_multiplier = _file.getInt("Multiplier", 1);
_drop_items = _file.getBoolean("DropItems", false);
_b_stats = _file.getBoolean("bStats", true);
_plugin.saveConfig();
}
@ -69,16 +68,6 @@ public class ConfigManager {
_plugin.saveConfig();
}
public Boolean enableBStats() {
return _b_stats;
}
public void setBStats(Boolean b_stats) {
_b_stats = b_stats;
_file.set("bStats", b_stats);
_plugin.saveConfig();
}
private final LiteWorldEdit _plugin = LiteWorldEdit.instance;
private FileConfiguration _file;
@ -92,5 +81,4 @@ public class ConfigManager {
private Boolean _drop_items;
private Integer _multiplier;
private Boolean _b_stats;
}

View File

@ -76,7 +76,8 @@ public class Metrics {
enabled,
this::appendPlatformData,
this::appendServiceData,
submitDataTask -> Bukkit.getScheduler().runTask(plugin, submitDataTask),
null,
//submitDataTask -> Bukkit.getScheduler().runTask(plugin, submitDataTask),
plugin::isEnabled,
(message, error) -> this.plugin.getLogger().log(Level.WARNING, message, error),
(message) -> this.plugin.getLogger().log(Level.INFO, message),

View File

@ -8,6 +8,4 @@ Multiplier: 1
DropItems: false
bStats: true
Debug: false