From 69460094b81e5f9e2f2d0da90cb5f9d5bcb32ee0 Mon Sep 17 00:00:00 2001 From: sk89q Date: Sat, 5 Apr 2014 20:09:52 -0700 Subject: [PATCH] Handle null World cases for EditSession when actor is console. It actually should never be null, but old code does it. --- .../com/sk89q/worldedit/event/extent/EditSessionEvent.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/sk89q/worldedit/event/extent/EditSessionEvent.java b/src/main/java/com/sk89q/worldedit/event/extent/EditSessionEvent.java index 29f6161c1..38124defe 100644 --- a/src/main/java/com/sk89q/worldedit/event/extent/EditSessionEvent.java +++ b/src/main/java/com/sk89q/worldedit/event/extent/EditSessionEvent.java @@ -73,8 +73,7 @@ public class EditSessionEvent extends Event { * @param maxBlocks the maximum number of block changes * @param stage the stage */ - public EditSessionEvent(World world, Actor actor, int maxBlocks, Stage stage) { - checkNotNull(world); + public EditSessionEvent(@Nullable World world, Actor actor, int maxBlocks, Stage stage) { this.world = world; this.actor = actor; this.maxBlocks = maxBlocks; @@ -95,7 +94,7 @@ public class EditSessionEvent extends Event { * * @return the world */ - public World getWorld() { + public @Nullable World getWorld() { return world; }