From 778314f9e4b0dd1d0e7bf447a08f24106b3626b9 Mon Sep 17 00:00:00 2001 From: sk89q Date: Thu, 4 Nov 2010 23:36:54 -0700 Subject: [PATCH] Update EditSession.rawSetBlock() to limit Y between 0 and 127. --- src/EditSession.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/EditSession.java b/src/EditSession.java index 4274a76e4..bf08991a6 100644 --- a/src/EditSession.java +++ b/src/EditSession.java @@ -102,6 +102,11 @@ public class EditSession { * @return Whether the block changed */ private boolean rawSetBlock(Vector pt, BaseBlock block) { + int y = pt.getBlockY(); + if (y < 0 || y > 127) { + return false; + } + boolean result = server.setBlockType(pt, block.getID()); if (block.getID() != 0) { server.setBlockData(pt, block.getData());