diff --git a/pom.xml b/pom.xml
index 365d619b..d8d98f85 100644
--- a/pom.xml
+++ b/pom.xml
@@ -359,21 +359,21 @@
org.powermock
powermock-module-junit4
- 2.0.0
+ 2.0.9
jar
test
org.powermock
powermock-api-easymock
- 2.0.0
+ 2.0.9
jar
test
org.powermock
powermock-api-mockito2
- 2.0.0
+ 2.0.9
jar
test
diff --git a/src/test/java/com/onarandombox/MultiverseCore/utils/TestInstanceCreator.java b/src/test/java/com/onarandombox/MultiverseCore/utils/TestInstanceCreator.java
index 9a29f93e..a0343c38 100644
--- a/src/test/java/com/onarandombox/MultiverseCore/utils/TestInstanceCreator.java
+++ b/src/test/java/com/onarandombox/MultiverseCore/utils/TestInstanceCreator.java
@@ -214,11 +214,18 @@ public class TestInstanceCreator {
serverfield.set(core, mockServer);
// Set buscript
- Buscript buscript = PowerMockito.spy(new Buscript(core));
+ Buscript buscript;
Field buscriptfield = MultiverseCore.class.getDeclaredField("buscript");
buscriptfield.setAccessible(true);
+
+ try {
+ buscript = PowerMockito.spy(new Buscript(core));
+ when(buscript.getPlugin()).thenReturn(core);
+ } catch (NullPointerException e) {
+ buscript = null;
+ }
+
buscriptfield.set(core, buscript);
- when(buscript.getPlugin()).thenReturn(core);
// Set worldManager
WorldManager wm = PowerMockito.spy(new WorldManager(core));