Pass LocalPlayers to the EditSession getters for easy external access

This commit is contained in:
Ammar Askar
2012-11-13 15:07:08 +05:00
committed by Wizjany
parent 94a549214d
commit 4b50e0e453
8 changed files with 42 additions and 17 deletions

View File

@ -46,7 +46,7 @@ public class BlockReplacer implements DoubleActionBlockTool {
BlockBag bag = session.getBlockBag(player);
LocalWorld world = clicked.getWorld();
EditSession editSession = WorldEdit.getInstance().getEditSessionFactory().getEditSession(world, -1, bag);
EditSession editSession = WorldEdit.getInstance().getEditSessionFactory().getEditSession(world, -1, bag, player);
try {
editSession.setBlock(clicked, targetBlock);
@ -66,7 +66,7 @@ public class BlockReplacer implements DoubleActionBlockTool {
LocalSession session, WorldVector clicked) {
LocalWorld world = clicked.getWorld();
EditSession editSession = WorldEdit.getInstance().getEditSessionFactory().getEditSession(world, -1);
EditSession editSession = WorldEdit.getInstance().getEditSessionFactory().getEditSession(world, -1, player);
targetBlock = (editSession).getBlock(clicked);
BlockType type = BlockType.fromID(targetBlock.getType());

View File

@ -37,7 +37,7 @@ public class QueryTool implements BlockTool {
LocalPlayer player, LocalSession session, WorldVector clicked) {
LocalWorld world = clicked.getWorld();
EditSession editSession = WorldEdit.getInstance().getEditSessionFactory().getEditSession(world, 0);
EditSession editSession = WorldEdit.getInstance().getEditSessionFactory().getEditSession(world, 0, player);
BaseBlock block = (editSession).rawGetBlock(clicked);
BlockType type = BlockType.fromID(block.getType());