mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-22 17:27:38 +00:00
Ignore PlayerInteracts with off-hand item.
Fixes WORLDEDIT-3437 The API will need to be changed to accomodate off-hand tools etc
This commit is contained in:
parent
7be1395ae2
commit
32fb5b302d
@ -8,7 +8,7 @@ repositories {
|
||||
dependencies {
|
||||
compile project(':worldedit-core')
|
||||
compile 'com.sk89q:dummypermscompat:1.8'
|
||||
compile 'org.bukkit:bukkit:1.8.8-R0.1-SNAPSHOT' // zzz
|
||||
compile 'org.bukkit:bukkit:1.9.4-R0.1-SNAPSHOT' // zzz
|
||||
testCompile 'org.mockito:mockito-core:1.9.0-rc1'
|
||||
}
|
||||
|
||||
|
@ -37,6 +37,7 @@ import org.bukkit.event.block.Action;
|
||||
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
|
||||
import org.bukkit.event.player.PlayerGameModeChangeEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.inventory.EquipmentSlot;
|
||||
|
||||
/**
|
||||
* Handles all events thrown in relation to a Player
|
||||
@ -116,6 +117,15 @@ public class WorldEditListener implements Listener {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
if (event.getHand() == EquipmentSlot.OFF_HAND) {
|
||||
return; // TODO api needs to be able to get either hand depending on event
|
||||
// for now just ignore all off hand interacts
|
||||
}
|
||||
} catch (NoSuchMethodError ignored) {
|
||||
} catch (NoSuchFieldError ignored) {
|
||||
}
|
||||
|
||||
final LocalPlayer player = plugin.wrapPlayer(event.getPlayer());
|
||||
final World world = player.getWorld();
|
||||
final WorldEdit we = plugin.getWorldEdit();
|
||||
|
Loading…
Reference in New Issue
Block a user