Skip to content

Commit

Permalink
Clarify messages
Browse files Browse the repository at this point in the history
  • Loading branch information
lenis0012 committed May 20, 2020
1 parent d946e7c commit 998f72f
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ public void loadConfig() {
@Register(name = "dependencies", type = Type.ENABLE, priority = 1)
public void loadDependencies() {
this.dependencies = new Dependencies(this);
if(Settings.PLOTSQUARED_AUTO_TRUST.value() && Bukkit.getPluginManager().isPluginEnabled("PlotSquared")) {
Plugin plotSquared = Bukkit.getPluginManager().getPlugin("PlotSquared");
getLogger().log(Level.INFO, "Detected PlotSquared v" + plotSquared.getDescription().getVersion() + ". Attempting to hook.");
hookPlotSquared();
}
}

@Register(name = "database", type = Register.Type.ENABLE)
Expand All @@ -86,16 +91,11 @@ public void registerListeners() {
register(new DatabaseListener(this));
register(new KissListener(this));
register(new UpdateListener(this));
if(Settings.PLOTSQUARED_AUTO_TRUST.value() && Bukkit.getPluginManager().isPluginEnabled("PlotSquared")) {
Plugin plotSquared = Bukkit.getPluginManager().getPlugin("PlotSquared");
getLogger().log(Level.INFO, "Hooking with PlotSquared v" + plotSquared.getDescription().getVersion());
hookPlotSquared();
}
}

private void hookPlotSquared() {
try {
getLogger().log(Level.INFO, "Attempting to hook with PlotSquared v5.");
getLogger().log(Level.INFO, "Attempting to hook using PlotSquared v5 API.");
Class.forName("com.plotsquared.core.api.PlotAPI");
register(new V5PlotSquaredListener());
getLogger().log(Level.INFO, "Success! Auto-trust has been enabled.");
Expand All @@ -104,7 +104,7 @@ private void hookPlotSquared() {
}

try {
getLogger().log(Level.INFO, "Attempting to hook with PlotSquared legacy.");
getLogger().log(Level.INFO, "Attempting to hook using PlotSquared legacy API.");
Class.forName("com.intellectualcrafters.plot.PS");
register(new LegacyPlotSquaredListener());
getLogger().log(Level.INFO, "Success! Auto-trust has been enabled.");
Expand Down

0 comments on commit 998f72f

Please sign in to comment.