Fix some test plugin errors

This commit is contained in:
Daniel Saukel 2016-05-06 16:16:28 +02:00
parent c4243232f0
commit be8f88f83e
4 changed files with 5 additions and 4 deletions

View File

@ -16,6 +16,7 @@
*/ */
package io.github.dre2n.dungeonsxl.global; package io.github.dre2n.dungeonsxl.global;
import io.github.dre2n.dungeonsxl.DungeonsXL;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collection; import java.util.Collection;
import org.bukkit.block.Block; import org.bukkit.block.Block;
@ -29,7 +30,7 @@ public class ChestProtection extends GlobalProtection {
private Block chest; private Block chest;
public ChestProtection(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; this.chest = chest;
} }

View File

@ -40,7 +40,7 @@ public class DGroupListener implements Listener {
public void onDisband(DGroupDisbandEvent event) { public void onDisband(DGroupDisbandEvent event) {
MessageUtil.log(plugin, "&b== " + event.getEventName() + "=="); MessageUtil.log(plugin, "&b== " + event.getEventName() + "==");
MessageUtil.log(plugin, "Cause: " + event.getCause()); MessageUtil.log(plugin, "Cause: " + event.getCause());
MessageUtil.log(plugin, "Creator: " + event.getDisbander().getName()); MessageUtil.log(plugin, "Disbander: " + event.getDisbander().getName());
} }
@EventHandler @EventHandler

View File

@ -66,7 +66,7 @@ public class DPlayerListener implements Listener {
public void onLeaveDGroup(DPlayerLeaveDGroupEvent event) { public void onLeaveDGroup(DPlayerLeaveDGroupEvent event) {
MessageUtil.log(plugin, "&b== " + event.getEventName() + "=="); MessageUtil.log(plugin, "&b== " + event.getEventName() + "==");
MessageUtil.log(plugin, "DPlayer: " + event.getDPlayer().getPlayer().getName()); 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... /*This would cause waaay too much console spam...

View File

@ -32,7 +32,7 @@ public class DSignListener implements Listener {
@EventHandler @EventHandler
public void onRegistration(DSignRegistrationEvent event) { public void onRegistration(DSignRegistrationEvent event) {
MessageUtil.log(plugin, "&b== " + event.getEventName() + "=="); 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()); MessageUtil.log(plugin, "DSign: " + event.getDSign().getType());
} }