Add option to opt-out MvDW Placeholder API

This commit is contained in:
N0tMyFaultOG
2020-09-02 12:13:23 +02:00
parent 1441cc293c
commit 97e34844b4
4 changed files with 12 additions and 9 deletions

View File

@ -21,7 +21,7 @@
<dependency>
<groupId>com.plotsquared</groupId>
<artifactId>PlotSquared-Core</artifactId>
<version>5.13.2</version>
<version>5.13.3</version>
<scope>compile</scope>
</dependency>
<dependency>

View File

@ -29,6 +29,7 @@ import com.plotsquared.bukkit.BukkitMain;
import com.plotsquared.bukkit.placeholder.MVdWPlaceholders;
import com.plotsquared.core.PlotSquared;
import com.plotsquared.core.configuration.Captions;
import com.plotsquared.core.configuration.Settings;
import org.bukkit.Bukkit;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
@ -43,7 +44,7 @@ public class ServerListener implements Listener {
}
@EventHandler public void onServerLoad(ServerLoadEvent event) {
if (Bukkit.getPluginManager().getPlugin("MVdWPlaceholderAPI") != null) {
if (Bukkit.getPluginManager().getPlugin("MVdWPlaceholderAPI") != null && Settings.Enabled_Components.USE_MVDWAPI) {
new MVdWPlaceholders(this.plugin, PlotSquared.get().getPlaceholderRegistry());
PlotSquared.log(Captions.PREFIX + "&6PlotSquared hooked into MVdWPlaceholderAPI");
}