Added dynmapProvider toggle (#144)

This commit is contained in:
Hutchy 2020-03-28 08:33:13 +11:00 committed by GitHub
parent 9434871d17
commit 189187fd25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 2 deletions

View File

@ -464,7 +464,8 @@ public void onEnable() {
this.essentialsProvider = new EssentialsProvider();
}
if (Bukkit.getPluginManager().getPlugin("dynmap") != null) {
if (Bukkit.getPluginManager().getPlugin("dynmap") != null
&& GriefDefenderPlugin.getGlobalConfig().getConfig().dynmap.enabled) {
this.dynmapProvider = new DynmapProvider();
}

View File

@ -35,6 +35,9 @@
@ConfigSerializable
public class DynmapCategory {
@Setting("enabled")
public boolean enabled = true;
@Setting("owner-styles")
public Map<String, DynmapOwnerStyleCategory> ownerStyles = new HashMap<>();

View File

@ -527,7 +527,8 @@ public void onServerAboutToStart(GameAboutToStartServerEvent event) {
return;
}
if (Sponge.getPluginManager().getPlugin("dynmap").isPresent()) {
if (Sponge.getPluginManager().getPlugin("dynmap").isPresent()
&& GriefDefenderPlugin.getGlobalConfig().getConfig().dynmap.enabled) {
this.dynmapProvider = new DynmapProvider();
}
if (Sponge.getPluginManager().getPlugin("mcclans").isPresent()) {

View File

@ -35,6 +35,9 @@
@ConfigSerializable
public class DynmapCategory {
@Setting("enabled")
public boolean enabled = true;
@Setting("owner-styles")
public Map<String, DynmapOwnerStyleCategory> ownerStyles = new HashMap<>();