mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-01-11 02:07:38 +00:00
Made events respect isCancelled()
This commit is contained in:
parent
4d6bb6d746
commit
a313f2e93e
@ -70,6 +70,9 @@ public class WorldEditPlayerListener extends PlayerListener {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void onPlayerCommandPreprocess(PlayerCommandPreprocessEvent event) {
|
public void onPlayerCommandPreprocess(PlayerCommandPreprocessEvent event) {
|
||||||
|
if (event.isCancelled())
|
||||||
|
return;
|
||||||
|
|
||||||
String[] split = event.getMessage().split(" ");
|
String[] split = event.getMessage().split(" ");
|
||||||
|
|
||||||
if (plugin.getWorldEdit().handleCommand(wrapPlayer(event.getPlayer()), split)) {
|
if (plugin.getWorldEdit().handleCommand(wrapPlayer(event.getPlayer()), split)) {
|
||||||
@ -84,6 +87,8 @@ public class WorldEditPlayerListener extends PlayerListener {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void onPlayerInteract(PlayerInteractEvent event) {
|
public void onPlayerInteract(PlayerInteractEvent event) {
|
||||||
|
if (event.isCancelled())
|
||||||
|
return;
|
||||||
if (event.getAction() == Action.LEFT_CLICK_BLOCK) {
|
if (event.getAction() == Action.LEFT_CLICK_BLOCK) {
|
||||||
LocalWorld world = new BukkitWorld(event.getClickedBlock().getWorld());
|
LocalWorld world = new BukkitWorld(event.getClickedBlock().getWorld());
|
||||||
WorldVector pos = new WorldVector(world, event.getClickedBlock().getX(),
|
WorldVector pos = new WorldVector(world, event.getClickedBlock().getX(),
|
||||||
|
Loading…
Reference in New Issue
Block a user