mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-02 08:50:17 +01:00
Fix #1277
This commit is contained in:
parent
610e204d12
commit
09994724db
@ -369,8 +369,11 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain
|
|||||||
PlayerEvents main = new PlayerEvents();
|
PlayerEvents main = new PlayerEvents();
|
||||||
getServer().getPluginManager().registerEvents(main, this);
|
getServer().getPluginManager().registerEvents(main, this);
|
||||||
try {
|
try {
|
||||||
|
getServer().getClass().getMethod("spigot");
|
||||||
getServer().getPluginManager().registerEvents(new EntitySpawnListener(), this);
|
getServer().getPluginManager().registerEvents(new EntitySpawnListener(), this);
|
||||||
} catch (Throwable ignore) {}
|
} catch (NoSuchMethodException ignored) {
|
||||||
|
PS.debug("Not running Spigot. Skipping EntitySpawnListener event.");
|
||||||
|
}
|
||||||
if (PS.get().checkVersion(getServerVersion(), 1, 8, 0)) {
|
if (PS.get().checkVersion(getServerVersion(), 1, 8, 0)) {
|
||||||
try {
|
try {
|
||||||
getServer().getPluginManager().registerEvents(new PlayerEvents_1_8(), this);
|
getServer().getPluginManager().registerEvents(new PlayerEvents_1_8(), this);
|
||||||
|
Loading…
Reference in New Issue
Block a user