Only handle primary input in block interact event handler.

This commit is contained in:
sk89q 2014-06-26 16:58:54 -07:00
parent 900c9b5258
commit ff7d5aad1a

View File

@ -25,6 +25,7 @@ import com.sk89q.worldedit.command.tool.DoubleActionBlockTool;
import com.sk89q.worldedit.command.tool.Tool; import com.sk89q.worldedit.command.tool.Tool;
import com.sk89q.worldedit.entity.Player; import com.sk89q.worldedit.entity.Player;
import com.sk89q.worldedit.event.actor.BlockInteractEvent; import com.sk89q.worldedit.event.actor.BlockInteractEvent;
import com.sk89q.worldedit.event.actor.InteractionType;
import com.sk89q.worldedit.internal.ServerInterfaceAdapter; import com.sk89q.worldedit.internal.ServerInterfaceAdapter;
import com.sk89q.worldedit.regions.RegionSelector; import com.sk89q.worldedit.regions.RegionSelector;
import com.sk89q.worldedit.util.Location; import com.sk89q.worldedit.util.Location;
@ -209,6 +210,7 @@ public class PlatformManager {
// At this time, only handle interaction from players // At this time, only handle interaction from players
if (actor instanceof Player) { if (actor instanceof Player) {
if (event.getType() == InteractionType.PRIMARY_INPUT) {
Player player = (Player) actor; Player player = (Player) actor;
LocalSession session = worldEdit.getSessionManager().get(actor); LocalSession session = worldEdit.getSessionManager().get(actor);
@ -253,6 +255,7 @@ public class PlatformManager {
} }
} }
} }
}
/** /**
* A default configuration for when none is set. * A default configuration for when none is set.