Fix custom explosions not workin

This commit is contained in:
boy0001 2015-04-01 08:00:09 +11:00
parent 331898c081
commit 3477132cf2
2 changed files with 6 additions and 2 deletions

View File

@ -203,7 +203,7 @@ public class PlayerEvents extends com.intellectualcrafters.plot.listeners.PlotLi
plotEntry(player, plot);
}
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
public static void PlayerMove(final PlayerMoveEvent event) {
final Location f = BukkitUtil.getLocation(event.getFrom());
final Location t = BukkitUtil.getLocation(event.getTo());
@ -252,7 +252,8 @@ public class PlayerEvents extends com.intellectualcrafters.plot.listeners.PlotLi
if (!plot.equals(getCurrentPlot(f))) {
plotEntry(player, plot);
}
} else if (leftPlot(f, t)) {
}
else if (leftPlot(f, t)) {
plot = getCurrentPlot(f);
plotExit(player, plot);
}

View File

@ -29,6 +29,9 @@ public class TNTListener implements Listener {
@EventHandler
public void onExplode(EntityExplodeEvent event) {
Entity entity = event.getEntity();
if (entity == null) {
return;
}
World world = entity.getWorld();
String worldname = world.getName();
if (!PlotSquared.isPlotWorld(worldname)) {