mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 07:06:44 +01:00
Bugfixes for deny-teleport
This commit is contained in:
parent
05ef076ef0
commit
ae1273a7f3
@ -679,8 +679,6 @@ import java.util.regex.Pattern;
|
|||||||
|
|
||||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||||
public void onTeleport(PlayerTeleportEvent event) {
|
public void onTeleport(PlayerTeleportEvent event) {
|
||||||
if (event.getTo() == null || event.getFrom() == null || !event.getFrom().getWorld()
|
|
||||||
.equals(event.getTo().getWorld())) {
|
|
||||||
final Object lastLoc =
|
final Object lastLoc =
|
||||||
BukkitUtil.getPlayer(event.getPlayer()).deleteMeta(PlotPlayer.META_LOCATION);
|
BukkitUtil.getPlayer(event.getPlayer()).deleteMeta(PlotPlayer.META_LOCATION);
|
||||||
final Object lastPlot =
|
final Object lastPlot =
|
||||||
@ -712,7 +710,6 @@ import java.util.regex.Pattern;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
playerMove(event);
|
playerMove(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,14 +22,14 @@ public class TeleportDenyFlag extends EnumFlag {
|
|||||||
result = !plot.getMembers().contains(player.getUUID());
|
result = !plot.getMembers().contains(player.getUUID());
|
||||||
break;
|
break;
|
||||||
case "nonmembers":
|
case "nonmembers":
|
||||||
result = !plot.isAdded(player.getUUID());
|
result = plot.isAdded(player.getUUID());
|
||||||
break;
|
break;
|
||||||
case "nontrusted":
|
case "nontrusted":
|
||||||
result = !plot.getTrusted().contains(player.getUUID()) && !plot
|
result = plot.getTrusted().contains(player.getUUID()) || plot
|
||||||
.isOwner(player.getUUID());
|
.isOwner(player.getUUID());
|
||||||
break;
|
break;
|
||||||
case "nonowners":
|
case "nonowners":
|
||||||
result = !plot.isOwner(player.getUUID());
|
result = plot.isOwner(player.getUUID());
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user