mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 09:47:38 +00:00
Merge pull request #457 from boy0001/platform-tweak
swap order of checks
This commit is contained in:
commit
35bb4deee9
@ -321,11 +321,7 @@ public class PlatformManager {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
if (event.getType() == Interaction.HIT) {
|
if (event.getType() == Interaction.HIT) {
|
||||||
if (player.getItemInHand(HandSide.MAIN_HAND).getType().getId().equals(getConfiguration().wandItem)) {
|
if (session.isToolControlEnabled() && player.getItemInHand(HandSide.MAIN_HAND).getType().getId().equals(getConfiguration().wandItem)) {
|
||||||
if (!session.isToolControlEnabled()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!actor.hasPermission("worldedit.selection.pos")) {
|
if (!actor.hasPermission("worldedit.selection.pos")) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -341,7 +337,7 @@ public class PlatformManager {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player.isHoldingPickAxe() && session.hasSuperPickAxe()) {
|
if (session.hasSuperPickAxe() && player.isHoldingPickAxe()) {
|
||||||
final BlockTool superPickaxe = session.getSuperPickaxe();
|
final BlockTool superPickaxe = session.getSuperPickaxe();
|
||||||
if (superPickaxe != null && superPickaxe.canUse(player)) {
|
if (superPickaxe != null && superPickaxe.canUse(player)) {
|
||||||
event.setCancelled(superPickaxe.actPrimary(queryCapability(Capability.WORLD_EDITING), getConfiguration(), player, session, location));
|
event.setCancelled(superPickaxe.actPrimary(queryCapability(Capability.WORLD_EDITING), getConfiguration(), player, session, location));
|
||||||
@ -358,11 +354,7 @@ public class PlatformManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
} else if (event.getType() == Interaction.OPEN) {
|
} else if (event.getType() == Interaction.OPEN) {
|
||||||
if (player.getItemInHand(HandSide.MAIN_HAND).getType().getId().equals(getConfiguration().wandItem)) {
|
if (session.isToolControlEnabled() && player.getItemInHand(HandSide.MAIN_HAND).getType().getId().equals(getConfiguration().wandItem)) {
|
||||||
if (!session.isToolControlEnabled()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!actor.hasPermission("worldedit.selection.pos")) {
|
if (!actor.hasPermission("worldedit.selection.pos")) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user