mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-09-06 00:58:26 +02:00
Fixed #1448
This commit is contained in:
parent
588639d9c2
commit
8edc357d01
@ -450,8 +450,9 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain
|
|||||||
getServer().getPluginManager().registerEvents(main, this);
|
getServer().getPluginManager().registerEvents(main, this);
|
||||||
try {
|
try {
|
||||||
getServer().getClass().getMethod("spigot");
|
getServer().getClass().getMethod("spigot");
|
||||||
|
Class.forName("org.bukkit.event.entity.EntitySpawnEvent");
|
||||||
getServer().getPluginManager().registerEvents(new EntitySpawnListener(), this);
|
getServer().getPluginManager().registerEvents(new EntitySpawnListener(), this);
|
||||||
} catch (NoSuchMethodException ignored) {
|
} catch (NoSuchMethodException | ClassNotFoundException ignored) {
|
||||||
PS.debug("Not running Spigot. Skipping EntitySpawnListener event.");
|
PS.debug("Not running Spigot. Skipping EntitySpawnListener event.");
|
||||||
}
|
}
|
||||||
if (PS.get().checkVersion(getServerVersion(), BukkitVersion.v1_8_0)) {
|
if (PS.get().checkVersion(getServerVersion(), BukkitVersion.v1_8_0)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user