Merge pull request #2 from HgeX/patch-2

properly register Plot listener
This commit is contained in:
DaniFoldi 2021-03-18 13:13:03 +01:00 committed by GitHub
commit 7c3057162a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -459,8 +459,11 @@ public class ShopChest extends JavaPlugin {
getServer().getPluginManager().registerEvents(new GriefPreventionListener(this), this); getServer().getPluginManager().registerEvents(new GriefPreventionListener(this), this);
if (hasIslandWorld()) if (hasIslandWorld())
getServer().getPluginManager().registerEvents(new IslandWorldListener(this), this); getServer().getPluginManager().registerEvents(new IslandWorldListener(this), this);
if (hasPlotSquared()) if (hasPlotSquared()) {
getServer().getPluginManager().registerEvents(new PlotSquaredListener(this), this); PlotSquaredListener psListener = new PlotSquaredListener(this);
getServer().getPluginManager().registerEvents(psListener, this);
PlotSquared.get().getEventDispatcher().registerListener(psListener);
}
if (hasTowny()) if (hasTowny())
getServer().getPluginManager().registerEvents(new TownyListener(this), this); getServer().getPluginManager().registerEvents(new TownyListener(this), this);
if (hasUSkyBlock()) if (hasUSkyBlock())