mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-25 22:56:45 +01:00
Fix #1355
There is the possibility this will cause issues with sponge Signed-off-by: MattBDev <mattbdev@outlook.com>
This commit is contained in:
parent
8e7e5dcb25
commit
a4363bdb27
@ -376,7 +376,7 @@ public class MainListener {
|
||||
}
|
||||
Optional<Explosive> source = event.getExplosion().getSourceExplosive();
|
||||
if (!source.isPresent()) {
|
||||
event.filterAll();
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
Explosive tnt = source.get();
|
||||
@ -385,21 +385,22 @@ public class MainListener {
|
||||
Plot currentPlot = current.getPlot();
|
||||
if (currentPlot == null) {
|
||||
if (current.isPlotArea()) {
|
||||
event.filterAll();
|
||||
event.setCancelled(true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (creator != null) {
|
||||
if (!currentPlot.isAdded(creator)) {
|
||||
event.filterAll();
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!currentPlot.getFlag(Flags.EXPLOSION).or(false)) {
|
||||
event.filterAll();
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
event.filter(loc -> currentPlot.equals(SpongeUtil.getLocation(loc.getExtent().getName(), loc).getPlot()));
|
||||
|
||||
event.getAffectedLocations().removeIf(worldLocation -> currentPlot.equals(SpongeUtil.getLocation(worldLocation.getExtent().getName(), worldLocation).getPlot()));
|
||||
event.filterEntities(entity -> currentPlot.equals(SpongeUtil.getLocation(entity).getPlot()));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user