Check actor permissions (slower)

This commit is contained in:
Jesse Boyd 2017-04-21 02:49:42 +10:00
parent b7e3eff59b
commit d6d3b51456
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F

View File

@ -359,7 +359,7 @@ public class PlatformManager {
if (event.getType() == Interaction.HIT) {
if (session.isToolControlEnabled() && playerActor.getItemInHand() == getConfiguration().wandItem) {
FawePlayer<?> fp = FawePlayer.wrap(playerActor);
if (!fp.hasPermission("worldedit.selection.pos")) {
if (!actor.hasPermission("worldedit.selection.pos")) {
return;
}
final RegionSelector selector = session.getRegionSelector(playerActor.getWorld());
@ -408,7 +408,7 @@ public class PlatformManager {
} else if (event.getType() == Interaction.OPEN) {
if (session.isToolControlEnabled() && playerActor.getItemInHand() == getConfiguration().wandItem) {
FawePlayer<?> fp = FawePlayer.wrap(playerActor);
if (!fp.hasPermission("worldedit.selection.pos")) {
if (!actor.hasPermission("worldedit.selection.pos")) {
return;
}
final RegionSelector selector = session.getRegionSelector(playerActor.getWorld());