mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-01-11 02:07:38 +00:00
Added a "pos1" pseudo block type, which uses the block type from the "primary position".
This commit is contained in:
parent
768adee389
commit
1b9445b6f2
@ -404,6 +404,18 @@ public class WorldEdit {
|
|||||||
return blockInHand;
|
return blockInHand;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
blockId = blockInHand.getId();
|
||||||
|
blockType = BlockType.fromID(blockId);
|
||||||
|
data = blockInHand.getData();
|
||||||
|
} else if ("pos1".equalsIgnoreCase(testID)) {
|
||||||
|
// Get the block type from the "primary position"
|
||||||
|
final LocalWorld world = player.getWorld();
|
||||||
|
final BlockVector primaryPosition = getSession(player).getRegionSelector(world).getPrimaryPosition();
|
||||||
|
final BaseBlock blockInHand = world.getBlock(primaryPosition);
|
||||||
|
if (blockInHand.getClass() != BaseBlock.class) {
|
||||||
|
return blockInHand;
|
||||||
|
}
|
||||||
|
|
||||||
blockId = blockInHand.getId();
|
blockId = blockInHand.getId();
|
||||||
blockType = BlockType.fromID(blockId);
|
blockType = BlockType.fromID(blockId);
|
||||||
data = blockInHand.getData();
|
data = blockInHand.getData();
|
||||||
|
Loading…
Reference in New Issue
Block a user