mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-03 09:00:55 +01:00
Fixed killallentities task
This commit is contained in:
parent
1667fcdf43
commit
866ddc9648
@ -501,15 +501,16 @@ public class PlotSquared {
|
|||||||
log(C.PREFIX.s() + "&cIt's really recommended to run Java 1.8, as it increases performance");
|
log(C.PREFIX.s() + "&cIt's really recommended to run Java 1.8, as it increases performance");
|
||||||
}
|
}
|
||||||
TASK = IMP.getTaskManager();
|
TASK = IMP.getTaskManager();
|
||||||
if (Settings.KILL_ROAD_MOBS) {
|
|
||||||
IMP.runEntityTask();
|
|
||||||
}
|
|
||||||
if (C.ENABLED.s().length() > 0) {
|
if (C.ENABLED.s().length() > 0) {
|
||||||
log(C.ENABLED.s());
|
log(C.ENABLED.s());
|
||||||
}
|
}
|
||||||
setupConfigs();
|
setupConfigs();
|
||||||
setupDefaultFlags();
|
setupDefaultFlags();
|
||||||
setupDatabase();
|
setupDatabase();
|
||||||
|
// Tasks
|
||||||
|
if (Settings.KILL_ROAD_MOBS) {
|
||||||
|
IMP.runEntityTask();
|
||||||
|
}
|
||||||
// Events
|
// Events
|
||||||
IMP.registerCommands();
|
IMP.registerCommands();
|
||||||
IMP.registerPlayerEvents();
|
IMP.registerPlayerEvents();
|
||||||
@ -550,6 +551,7 @@ public class PlotSquared {
|
|||||||
// Copy files
|
// Copy files
|
||||||
copyFile("town.template");
|
copyFile("town.template");
|
||||||
copyFile("skyblock.template");
|
copyFile("skyblock.template");
|
||||||
|
showDebug();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void copyFile(String file) {
|
public void copyFile(String file) {
|
||||||
@ -595,7 +597,7 @@ public class PlotSquared {
|
|||||||
connection.close();
|
connection.close();
|
||||||
mySQL.closeConnection();
|
mySQL.closeConnection();
|
||||||
} catch (NullPointerException | SQLException e) {
|
} catch (NullPointerException | SQLException e) {
|
||||||
if (connection != null) {
|
if (mySQL != null) {
|
||||||
log("&cCould not close mysql connection!");
|
log("&cCould not close mysql connection!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -110,7 +110,7 @@ import com.intellectualcrafters.plot.util.bukkit.UUIDHandler;
|
|||||||
public class PlayerEvents extends com.intellectualcrafters.plot.listeners.PlotListener implements Listener {
|
public class PlayerEvents extends com.intellectualcrafters.plot.listeners.PlotListener implements Listener {
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onRedstoneEvent(BlockRedstoneEvent event) {
|
public static void onRedstoneEvent(BlockRedstoneEvent event) {
|
||||||
Block block = event.getBlock();
|
Block block = event.getBlock();
|
||||||
Location loc = BukkitUtil.getLocation(block.getLocation());
|
Location loc = BukkitUtil.getLocation(block.getLocation());
|
||||||
if (!isPlotWorld(loc.getWorld())) {
|
if (!isPlotWorld(loc.getWorld())) {
|
||||||
@ -159,9 +159,9 @@ public class PlayerEvents extends com.intellectualcrafters.plot.listeners.PlotLi
|
|||||||
}
|
}
|
||||||
event.setNewCurrent(0);
|
event.setNewCurrent(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPhysicsEvent(BlockPhysicsEvent event) {
|
public static void onPhysicsEvent(BlockPhysicsEvent event) {
|
||||||
Block block = event.getBlock();
|
Block block = event.getBlock();
|
||||||
Location loc = BukkitUtil.getLocation(block.getLocation());
|
Location loc = BukkitUtil.getLocation(block.getLocation());
|
||||||
if (!isPlotWorld(loc.getWorld())) {
|
if (!isPlotWorld(loc.getWorld())) {
|
||||||
|
Loading…
Reference in New Issue
Block a user