Made events respect isCancelled()

Dieser Commit ist enthalten in:
zml2008 2011-08-16 18:39:07 -07:00
Ursprung 4d6bb6d746
Commit a313f2e93e

Datei anzeigen

@ -70,6 +70,9 @@ public class WorldEditPlayerListener extends PlayerListener {
*/
@Override
public void onPlayerCommandPreprocess(PlayerCommandPreprocessEvent event) {
if (event.isCancelled())
return;
String[] split = event.getMessage().split(" ");
if (plugin.getWorldEdit().handleCommand(wrapPlayer(event.getPlayer()), split)) {
@ -84,6 +87,8 @@ public class WorldEditPlayerListener extends PlayerListener {
*/
@Override
public void onPlayerInteract(PlayerInteractEvent event) {
if (event.isCancelled())
return;
if (event.getAction() == Action.LEFT_CLICK_BLOCK) {
LocalWorld world = new BukkitWorld(event.getClickedBlock().getWorld());
WorldVector pos = new WorldVector(world, event.getClickedBlock().getX(),