From ffdc7b4be0067a870f257174d2124d8db217aa1e Mon Sep 17 00:00:00 2001 From: AlexTheCoder Date: Sat, 2 Jul 2016 18:05:26 -0400 Subject: [PATCH] Temporarily patch random nullpointer --- .../src/mineplex/core/blockrestore/BlockRestore.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/blockrestore/BlockRestore.java b/Plugins/Mineplex.Core/src/mineplex/core/blockrestore/BlockRestore.java index cbffb8a05..be61ca417 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/blockrestore/BlockRestore.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/blockrestore/BlockRestore.java @@ -160,7 +160,13 @@ public class BlockRestore extends MiniPlugin public void add(Block block, int toID, byte toData, int fromID, byte fromData, long expireTime, boolean restoreOnBreak) { if (!contains(block)) getBlocks().put(block, new BlockRestoreData(block, toID, toData, fromID, fromData, expireTime, 0, restoreOnBreak)); - else getData(block).update(toID, toData, expireTime); + else + { + if (getData(block) != null) + { + getData(block).update(toID, toData, expireTime); + } + } } public void snow(Block block, byte heightAdd, byte heightMax, long expireTime, long meltDelay, int heightJumps)