mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-23 13:46:45 +01:00
Better handling of offline projectile shooters (#3705)
This commit is contained in:
parent
f218902581
commit
312cb2996c
@ -149,6 +149,18 @@ public class ProjectileEventListener implements Listener {
|
||||
Plot plot = area.getPlot(location);
|
||||
ProjectileSource shooter = entity.getShooter();
|
||||
if (shooter instanceof Player) {
|
||||
if (!((Player) shooter).isOnline()) {
|
||||
if (plot != null) {
|
||||
if (plot.isAdded(((Player) shooter).getUniqueId()) || plot.getFlag(ProjectilesFlag.class)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
entity.remove();
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
PlotPlayer<?> pp = BukkitUtil.adapt((Player) shooter);
|
||||
if (plot == null) {
|
||||
if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_PROJECTILE_UNOWNED)) {
|
||||
|
Loading…
Reference in New Issue
Block a user