Fixed event calling for console

This commit is contained in:
boy0001 2015-07-28 04:12:51 +10:00
parent cf10c609a9
commit dd2cbeaaf8
2 changed files with 17 additions and 8 deletions

View File

@ -1,16 +1,22 @@
package com.intellectualcrafters.plot.util;
import com.intellectualcrafters.plot.PS;
import com.intellectualcrafters.plot.flag.Flag;
import com.intellectualcrafters.plot.flag.FlagManager;
import com.intellectualcrafters.plot.object.*;
import com.plotsquared.bukkit.listeners.PlayerBlockEventType;
import com.plotsquared.bukkit.util.SetupUtils;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.UUID;
import com.intellectualcrafters.plot.PS;
import com.intellectualcrafters.plot.flag.Flag;
import com.intellectualcrafters.plot.flag.FlagManager;
import com.plotsquared.bukkit.listeners.PlayerBlockEventType;
import com.intellectualcrafters.plot.object.LazyBlock;
import com.intellectualcrafters.plot.object.Location;
import com.intellectualcrafters.plot.object.Plot;
import com.intellectualcrafters.plot.object.PlotBlock;
import com.intellectualcrafters.plot.object.PlotCluster;
import com.intellectualcrafters.plot.object.PlotId;
import com.intellectualcrafters.plot.object.PlotPlayer;
import com.plotsquared.bukkit.util.SetupUtils;
public abstract class EventUtil {
public static EventUtil manager = null;

View File

@ -16,7 +16,10 @@ import java.util.UUID;
public class BukkitEventUtil extends EventUtil {
public Player getPlayer(PlotPlayer player) {
return ((BukkitPlayer) player).player;
if (player instanceof BukkitPlayer) {
return ((BukkitPlayer) player).player;
}
return null;
}
public boolean callEvent(Event event) {