mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-23 05:36:45 +01:00
Fix custom explosions not workin
This commit is contained in:
parent
331898c081
commit
3477132cf2
@ -203,7 +203,7 @@ public class PlayerEvents extends com.intellectualcrafters.plot.listeners.PlotLi
|
|||||||
plotEntry(player, plot);
|
plotEntry(player, plot);
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
|
||||||
public static void PlayerMove(final PlayerMoveEvent event) {
|
public static void PlayerMove(final PlayerMoveEvent event) {
|
||||||
final Location f = BukkitUtil.getLocation(event.getFrom());
|
final Location f = BukkitUtil.getLocation(event.getFrom());
|
||||||
final Location t = BukkitUtil.getLocation(event.getTo());
|
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))) {
|
if (!plot.equals(getCurrentPlot(f))) {
|
||||||
plotEntry(player, plot);
|
plotEntry(player, plot);
|
||||||
}
|
}
|
||||||
} else if (leftPlot(f, t)) {
|
}
|
||||||
|
else if (leftPlot(f, t)) {
|
||||||
plot = getCurrentPlot(f);
|
plot = getCurrentPlot(f);
|
||||||
plotExit(player, plot);
|
plotExit(player, plot);
|
||||||
}
|
}
|
||||||
|
@ -29,6 +29,9 @@ public class TNTListener implements Listener {
|
|||||||
@EventHandler
|
@EventHandler
|
||||||
public void onExplode(EntityExplodeEvent event) {
|
public void onExplode(EntityExplodeEvent event) {
|
||||||
Entity entity = event.getEntity();
|
Entity entity = event.getEntity();
|
||||||
|
if (entity == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
World world = entity.getWorld();
|
World world = entity.getWorld();
|
||||||
String worldname = world.getName();
|
String worldname = world.getName();
|
||||||
if (!PlotSquared.isPlotWorld(worldname)) {
|
if (!PlotSquared.isPlotWorld(worldname)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user