mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 05:06:44 +01:00
Fix metrics setting
This commit is contained in:
parent
56fb892818
commit
5e20c871a5
@ -100,7 +100,6 @@ import com.plotsquared.core.plot.world.SinglePlotArea;
|
|||||||
import com.plotsquared.core.plot.world.SinglePlotAreaManager;
|
import com.plotsquared.core.plot.world.SinglePlotAreaManager;
|
||||||
import com.plotsquared.core.setup.PlotAreaBuilder;
|
import com.plotsquared.core.setup.PlotAreaBuilder;
|
||||||
import com.plotsquared.core.setup.SettingsNodesWrapper;
|
import com.plotsquared.core.setup.SettingsNodesWrapper;
|
||||||
import com.plotsquared.core.util.ConsoleColors;
|
|
||||||
import com.plotsquared.core.util.EconHandler;
|
import com.plotsquared.core.util.EconHandler;
|
||||||
import com.plotsquared.core.util.EventDispatcher;
|
import com.plotsquared.core.util.EventDispatcher;
|
||||||
import com.plotsquared.core.util.FileUtils;
|
import com.plotsquared.core.util.FileUtils;
|
||||||
@ -120,7 +119,6 @@ import io.papermc.lib.PaperLib;
|
|||||||
import net.kyori.adventure.audience.Audience;
|
import net.kyori.adventure.audience.Audience;
|
||||||
import org.bstats.bukkit.Metrics;
|
import org.bstats.bukkit.Metrics;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.ChatColor;
|
|
||||||
import org.bukkit.Chunk;
|
import org.bukkit.Chunk;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
@ -305,7 +303,7 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
|
|||||||
new WE_Anywhere();
|
new WE_Anywhere();
|
||||||
}
|
}
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.error("[P2] Incompatible version of WorldEdit, please upgrade: http://builds.enginehub.org/job/worldedit?branch=master");
|
logger.error("[P2] Incompatible version of WorldEdit, please upgrade: https://builds.enginehub.org/job/worldedit?branch=master");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -502,7 +500,14 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
|
|||||||
logger.info("[P2] PlaceholderAPI is not in use. Hook deactivated");
|
logger.info("[P2] PlaceholderAPI is not in use. Hook deactivated");
|
||||||
}
|
}
|
||||||
|
|
||||||
this.startMetrics();
|
if (Settings.Enabled_Components.BSTATS) {
|
||||||
|
this.startMetrics();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
logger.info("[P2] bStats is disabled. Enabling it in /plugins/PlotSquared/config/settings.yml helps the developers to identify the features most used");
|
||||||
|
logger.info("[P2] and organize future updates better. Cheers.");
|
||||||
|
}
|
||||||
|
|
||||||
if (Settings.Enabled_Components.WORLDS) {
|
if (Settings.Enabled_Components.WORLDS) {
|
||||||
TaskManager.getPlatformImplementation().taskRepeat(this::unload, TaskTime.seconds(1L));
|
TaskManager.getPlatformImplementation().taskRepeat(this::unload, TaskTime.seconds(1L));
|
||||||
try {
|
try {
|
||||||
|
@ -184,10 +184,12 @@ public class Settings extends Config {
|
|||||||
Limit.MAX_PLOTS = config.getInt("max_plots", Limit.MAX_PLOTS);
|
Limit.MAX_PLOTS = config.getInt("max_plots", Limit.MAX_PLOTS);
|
||||||
Limit.GLOBAL = config.getBoolean("global_limit", Limit.GLOBAL);
|
Limit.GLOBAL = config.getBoolean("global_limit", Limit.GLOBAL);
|
||||||
|
|
||||||
// Misc
|
// Miscellaneous
|
||||||
DEBUG = config.getBoolean("debug", DEBUG);
|
DEBUG = config.getBoolean("debug", DEBUG);
|
||||||
Chat.CONSOLE_COLOR = config.getBoolean("console.color", Chat.CONSOLE_COLOR);
|
Chat.CONSOLE_COLOR = config.getBoolean("console.color", Chat.CONSOLE_COLOR);
|
||||||
Chat.INTERACTIVE = config.getBoolean("chat.fancy", Chat.INTERACTIVE);
|
Chat.INTERACTIVE = config.getBoolean("chat.fancy", Chat.INTERACTIVE);
|
||||||
|
Enabled_Components.BSTATS =
|
||||||
|
config.getBoolean("bstats", Enabled_Components.BSTATS);
|
||||||
|
|
||||||
Enabled_Components.DATABASE_PURGER =
|
Enabled_Components.DATABASE_PURGER =
|
||||||
config.getBoolean("auto-purge", Enabled_Components.DATABASE_PURGER);
|
config.getBoolean("auto-purge", Enabled_Components.DATABASE_PURGER);
|
||||||
@ -421,7 +423,7 @@ public class Settings extends Config {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Comment("Misc settings")
|
@Comment("Miscellaneous settings")
|
||||||
public static final class Done {
|
public static final class Done {
|
||||||
@Comment("Require a plot marked as done to download (/plot download)") public static boolean
|
@Comment("Require a plot marked as done to download (/plot download)") public static boolean
|
||||||
REQUIRED_FOR_DOWNLOAD = false;
|
REQUIRED_FOR_DOWNLOAD = false;
|
||||||
@ -590,6 +592,8 @@ public class Settings extends Config {
|
|||||||
public static boolean EXTENDED_USERNAME_COMPLETION = true;
|
public static boolean EXTENDED_USERNAME_COMPLETION = true;
|
||||||
@Comment("Command aliases that will be tab completed")
|
@Comment("Command aliases that will be tab completed")
|
||||||
public static List<String> TAB_COMPLETED_ALIASES = Arrays.asList("plot", "plots", "p", "plotsquared", "plot2", "p2", "ps", "2", "plotme", "plotz", "ap");
|
public static List<String> TAB_COMPLETED_ALIASES = Arrays.asList("plot", "plots", "p", "plotsquared", "plot2", "p2", "ps", "2", "plotme", "plotz", "ap");
|
||||||
|
@Comment({"Send anonymous PlotSquared statistics to https://bstats.org/.",
|
||||||
|
"Please keep this setting enabled. It helps us identifying which parts of PlotSquared are used the most to organize future updates better."}) public static boolean BSTATS = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user