diff --git a/src/test/java/io/github/dre2n/dungeonsxl/global/ChestProtection.java b/src/test/java/io/github/dre2n/dungeonsxl/global/ChestProtection.java index fdcc90a1..edafd20a 100644 --- a/src/test/java/io/github/dre2n/dungeonsxl/global/ChestProtection.java +++ b/src/test/java/io/github/dre2n/dungeonsxl/global/ChestProtection.java @@ -16,6 +16,7 @@ */ package io.github.dre2n.dungeonsxl.global; +import io.github.dre2n.dungeonsxl.DungeonsXL; import java.util.Arrays; import java.util.Collection; import org.bukkit.block.Block; @@ -29,7 +30,7 @@ public class ChestProtection extends GlobalProtection { private Block chest; public ChestProtection(Block chest) { - super(chest.getWorld(), plugin.getGlobalProtections().generateId(ChestProtection.class, chest.getWorld())); + super(chest.getWorld(), DungeonsXL.getInstance().getGlobalProtections().generateId(ChestProtection.class, chest.getWorld())); this.chest = chest; } diff --git a/src/test/java/io/github/dre2n/dungeonsxl/listener/DGroupListener.java b/src/test/java/io/github/dre2n/dungeonsxl/listener/DGroupListener.java index d7d8861c..daed820f 100644 --- a/src/test/java/io/github/dre2n/dungeonsxl/listener/DGroupListener.java +++ b/src/test/java/io/github/dre2n/dungeonsxl/listener/DGroupListener.java @@ -40,7 +40,7 @@ public class DGroupListener implements Listener { public void onDisband(DGroupDisbandEvent event) { MessageUtil.log(plugin, "&b== " + event.getEventName() + "=="); MessageUtil.log(plugin, "Cause: " + event.getCause()); - MessageUtil.log(plugin, "Creator: " + event.getDisbander().getName()); + MessageUtil.log(plugin, "Disbander: " + event.getDisbander().getName()); } @EventHandler diff --git a/src/test/java/io/github/dre2n/dungeonsxl/listener/DPlayerListener.java b/src/test/java/io/github/dre2n/dungeonsxl/listener/DPlayerListener.java index b54c1d75..af128edc 100644 --- a/src/test/java/io/github/dre2n/dungeonsxl/listener/DPlayerListener.java +++ b/src/test/java/io/github/dre2n/dungeonsxl/listener/DPlayerListener.java @@ -66,7 +66,7 @@ public class DPlayerListener implements Listener { public void onLeaveDGroup(DPlayerLeaveDGroupEvent event) { MessageUtil.log(plugin, "&b== " + event.getEventName() + "=="); MessageUtil.log(plugin, "DPlayer: " + event.getDPlayer().getPlayer().getName()); - MessageUtil.log(plugin, "DGroup: " + event.getDGroup().getName()); + MessageUtil.log(plugin, "DGroup: " + (event.getDGroup() == null ? "" : event.getDGroup().getName())); } /*This would cause waaay too much console spam... diff --git a/src/test/java/io/github/dre2n/dungeonsxl/listener/DSignListener.java b/src/test/java/io/github/dre2n/dungeonsxl/listener/DSignListener.java index 2f83352a..8023192f 100644 --- a/src/test/java/io/github/dre2n/dungeonsxl/listener/DSignListener.java +++ b/src/test/java/io/github/dre2n/dungeonsxl/listener/DSignListener.java @@ -32,7 +32,7 @@ public class DSignListener implements Listener { @EventHandler public void onRegistration(DSignRegistrationEvent event) { MessageUtil.log(plugin, "&b== " + event.getEventName() + "=="); - MessageUtil.log(plugin, "GameWorld (ID): " + event.getGameWorld().getId()); + MessageUtil.log(plugin, "GameWorld (ID): " + (event.getGameWorld() == null ? "" : event.getGameWorld().getId())); MessageUtil.log(plugin, "DSign: " + event.getDSign().getType()); }