diff --git a/pom.xml b/pom.xml index 82acff50e..c15571b74 100644 --- a/pom.xml +++ b/pom.xml @@ -1,51 +1,17 @@ - + 4.0.0 + net.citizensnpcs citizens 2.0-SNAPSHOT Citizens - - - UTF-8 - 1.2.5-R1.2-SNAPSHOT - 2.0-SNAPSHOT - Unknown - - - - - bukkit-repo - http://repo.bukkit.org/content/groups/public/ - - - - everything - http://repo.citizensnpcs.net - - - - - - org.bukkit - craftbukkit - ${craftbukkit.version} - jar - provided - - - net.citizensnpcs - citizensapi - ${citizensapi.version} - jar - compile - - - http://www.citizensnpcs.net + + jenkins http://ci.citizensnpcs.net @@ -55,6 +21,61 @@ scm:git:git:@github.com:CitizensDev/Citizens2.git https://github.com/CitizensDev/Citizens2/tree/master/ + + + + UTF-8 + + + + + + bukkit-repo + http://repo.bukkit.org/content/groups/public/ + + + spout-repo + http://nexus.spout.org/content/groups/public/ + + + everything + http://repo.citizensnpcs.net + + + + + + + net.citizensnpcs + citizensapi + 2.0-SNAPSHOT + jar + compile + + + org.bukkit + craftbukkit + 1.2.5-R1.4-SNAPSHOT + jar + provided + + + org.spout + spoutapi + dev-SNAPSHOT + jar + provided + + + org.spout + vanilla + 1.2.5-SNAPSHOT + jar + provided + + + + clean package install ${basedir}/src/main/java diff --git a/src/main/java/net/citizensnpcs/Citizens.java b/src/main/java/net/citizensnpcs/Citizens.java index 92f726a8b..783eefe5d 100644 --- a/src/main/java/net/citizensnpcs/Citizens.java +++ b/src/main/java/net/citizensnpcs/Citizens.java @@ -1,6 +1,7 @@ package net.citizensnpcs; import java.io.File; +import java.util.logging.Logger; import net.citizensnpcs.api.CitizensPlugin; import net.citizensnpcs.api.abstraction.Server; @@ -10,6 +11,7 @@ import net.citizensnpcs.npc.CitizensAttachmentFactory; import net.citizensnpcs.npc.NPCSelector; public class Citizens implements CitizensPlugin { + private static final Logger logger = Logger.getLogger("Minecraft"); private final CitizensAttachmentFactory attachmentFactory = new CitizensAttachmentFactory(); private final File dataFolder; private final Server server; @@ -50,4 +52,8 @@ public class Citizens implements CitizensPlugin { public Server getServer() { return server; } + + public static Logger getLogger() { + return logger; + } } diff --git a/src/main/java/net/citizensnpcs/EventListen.java b/src/main/java/net/citizensnpcs/EventListen.java index 5c6c55907..5ebd63512 100644 --- a/src/main/java/net/citizensnpcs/EventListen.java +++ b/src/main/java/net/citizensnpcs/EventListen.java @@ -1,20 +1,19 @@ package net.citizensnpcs; import net.citizensnpcs.Settings.Setting; -import net.citizensnpcs.abstraction.bukkit.BukkitConverter; import net.citizensnpcs.api.CitizensAPI; import net.citizensnpcs.api.abstraction.Chunk; import net.citizensnpcs.api.abstraction.EventHandler; import net.citizensnpcs.api.abstraction.Listener; import net.citizensnpcs.api.abstraction.WorldVector; import net.citizensnpcs.api.abstraction.entity.Player; -import net.citizensnpcs.api.event.CitizensImplementationChangedEvent; import net.citizensnpcs.api.event.NPCDamageByEntityEvent; import net.citizensnpcs.api.event.NPCDamageEvent; import net.citizensnpcs.api.event.NPCLeftClickEvent; import net.citizensnpcs.api.event.NPCRightClickEvent; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.api.npc.NPCRegistry; +import net.citizensnpcs.bukkit.BukkitConverter; import net.citizensnpcs.editor.Editor; import net.citizensnpcs.npc.entity.EntityHumanNPC; import net.citizensnpcs.trait.CurrentLocation; @@ -45,12 +44,6 @@ public class EventListen implements Listener { private final NPCRegistry npcRegistry = CitizensAPI.getNPCRegistry(); private final ListMultimap toRespawn = ArrayListMultimap.create(); - @EventHandler - public void onImplementationChanged(CitizensImplementationChangedEvent event) { - Messaging.severe("Citizens implementation changed, disabling plugin."); - Bukkit.getPluginManager().disablePlugin(Bukkit.getPluginManager().getPlugin("Citizens")); - } - /* * Chunk events */ @@ -223,4 +216,4 @@ public class EventListen implements Listener { return x == other.x && z == other.z; } } -} \ No newline at end of file +} diff --git a/src/main/java/net/citizensnpcs/abstraction/bukkit/BukkitConverter.java b/src/main/java/net/citizensnpcs/bukkit/BukkitConverter.java similarity index 96% rename from src/main/java/net/citizensnpcs/abstraction/bukkit/BukkitConverter.java rename to src/main/java/net/citizensnpcs/bukkit/BukkitConverter.java index 1c3c64d02..1899a1ba3 100644 --- a/src/main/java/net/citizensnpcs/abstraction/bukkit/BukkitConverter.java +++ b/src/main/java/net/citizensnpcs/bukkit/BukkitConverter.java @@ -1,4 +1,4 @@ -package net.citizensnpcs.abstraction.bukkit; +package net.citizensnpcs.bukkit; import net.citizensnpcs.api.abstraction.ItemStack; import net.citizensnpcs.api.abstraction.MobType; diff --git a/src/main/java/net/citizensnpcs/abstraction/bukkit/BukkitEntity.java b/src/main/java/net/citizensnpcs/bukkit/BukkitEntity.java similarity index 97% rename from src/main/java/net/citizensnpcs/abstraction/bukkit/BukkitEntity.java rename to src/main/java/net/citizensnpcs/bukkit/BukkitEntity.java index 9c2e78050..522f3c162 100644 --- a/src/main/java/net/citizensnpcs/abstraction/bukkit/BukkitEntity.java +++ b/src/main/java/net/citizensnpcs/bukkit/BukkitEntity.java @@ -1,4 +1,4 @@ -package net.citizensnpcs.abstraction.bukkit; +package net.citizensnpcs.bukkit; import java.util.List; diff --git a/src/main/java/net/citizensnpcs/abstraction/bukkit/BukkitEventConverter.java b/src/main/java/net/citizensnpcs/bukkit/BukkitEventConverter.java similarity index 98% rename from src/main/java/net/citizensnpcs/abstraction/bukkit/BukkitEventConverter.java rename to src/main/java/net/citizensnpcs/bukkit/BukkitEventConverter.java index 54727d1ce..5995df965 100644 --- a/src/main/java/net/citizensnpcs/abstraction/bukkit/BukkitEventConverter.java +++ b/src/main/java/net/citizensnpcs/bukkit/BukkitEventConverter.java @@ -15,7 +15,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package net.citizensnpcs.abstraction.bukkit; +package net.citizensnpcs.bukkit; import javassist.CannotCompileException; import javassist.ClassPool; diff --git a/src/main/java/net/citizensnpcs/abstraction/bukkit/BukkitLivingEntity.java b/src/main/java/net/citizensnpcs/bukkit/BukkitLivingEntity.java similarity index 94% rename from src/main/java/net/citizensnpcs/abstraction/bukkit/BukkitLivingEntity.java rename to src/main/java/net/citizensnpcs/bukkit/BukkitLivingEntity.java index 68c9b6005..910b9f5b0 100644 --- a/src/main/java/net/citizensnpcs/abstraction/bukkit/BukkitLivingEntity.java +++ b/src/main/java/net/citizensnpcs/bukkit/BukkitLivingEntity.java @@ -1,4 +1,4 @@ -package net.citizensnpcs.abstraction.bukkit; +package net.citizensnpcs.bukkit; import net.citizensnpcs.api.abstraction.MobType; import net.citizensnpcs.api.abstraction.entity.LivingEntity; diff --git a/src/main/java/net/citizensnpcs/abstraction/bukkit/BukkitPlayer.java b/src/main/java/net/citizensnpcs/bukkit/BukkitPlayer.java similarity index 98% rename from src/main/java/net/citizensnpcs/abstraction/bukkit/BukkitPlayer.java rename to src/main/java/net/citizensnpcs/bukkit/BukkitPlayer.java index 229bd0070..4baa56d07 100644 --- a/src/main/java/net/citizensnpcs/abstraction/bukkit/BukkitPlayer.java +++ b/src/main/java/net/citizensnpcs/bukkit/BukkitPlayer.java @@ -1,4 +1,4 @@ -package net.citizensnpcs.abstraction.bukkit; +package net.citizensnpcs.bukkit; import net.citizensnpcs.api.abstraction.Equipment; import net.citizensnpcs.api.abstraction.ItemStack; diff --git a/src/main/java/net/citizensnpcs/abstraction/bukkit/BukkitServer.java b/src/main/java/net/citizensnpcs/bukkit/BukkitServer.java similarity index 96% rename from src/main/java/net/citizensnpcs/abstraction/bukkit/BukkitServer.java rename to src/main/java/net/citizensnpcs/bukkit/BukkitServer.java index 0702f6bae..4214c8582 100644 --- a/src/main/java/net/citizensnpcs/abstraction/bukkit/BukkitServer.java +++ b/src/main/java/net/citizensnpcs/bukkit/BukkitServer.java @@ -1,4 +1,4 @@ -package net.citizensnpcs.abstraction.bukkit; +package net.citizensnpcs.bukkit; import net.citizensnpcs.api.abstraction.Server; diff --git a/src/main/java/net/citizensnpcs/CitizensBukkit.java b/src/main/java/net/citizensnpcs/bukkit/CitizensBukkit.java similarity index 98% rename from src/main/java/net/citizensnpcs/CitizensBukkit.java rename to src/main/java/net/citizensnpcs/bukkit/CitizensBukkit.java index e2601bf9f..6d80aa5ae 100644 --- a/src/main/java/net/citizensnpcs/CitizensBukkit.java +++ b/src/main/java/net/citizensnpcs/bukkit/CitizensBukkit.java @@ -1,4 +1,4 @@ -package net.citizensnpcs; +package net.citizensnpcs.bukkit; import java.io.File; import java.io.IOException; @@ -7,8 +7,13 @@ import java.util.Iterator; import javassist.ClassPool; import javassist.Loader; +import net.citizensnpcs.Citizens; +import net.citizensnpcs.CitizensDisableEvent; +import net.citizensnpcs.EventListen; +import net.citizensnpcs.Metrics; +import net.citizensnpcs.Settings; +import net.citizensnpcs.Metrics.Plotter; import net.citizensnpcs.Settings.Setting; -import net.citizensnpcs.abstraction.bukkit.BukkitEventConverter; import net.citizensnpcs.api.CitizensAPI; import net.citizensnpcs.api.abstraction.MobType; import net.citizensnpcs.api.abstraction.entity.Player; diff --git a/src/main/java/net/citizensnpcs/command/command/AdminCommands.java b/src/main/java/net/citizensnpcs/command/command/AdminCommands.java index 75eadb295..34afde2de 100644 --- a/src/main/java/net/citizensnpcs/command/command/AdminCommands.java +++ b/src/main/java/net/citizensnpcs/command/command/AdminCommands.java @@ -1,9 +1,9 @@ package net.citizensnpcs.command.command; -import net.citizensnpcs.CitizensBukkit; import net.citizensnpcs.api.abstraction.CommandSender; import net.citizensnpcs.api.exception.NPCLoadException; import net.citizensnpcs.api.npc.NPC; +import net.citizensnpcs.bukkit.CitizensBukkit; import net.citizensnpcs.command.Command; import net.citizensnpcs.command.CommandContext; import net.citizensnpcs.command.Requirements; diff --git a/src/main/java/net/citizensnpcs/command/command/HelpCommands.java b/src/main/java/net/citizensnpcs/command/command/HelpCommands.java index 817d76e81..136d8cd7d 100644 --- a/src/main/java/net/citizensnpcs/command/command/HelpCommands.java +++ b/src/main/java/net/citizensnpcs/command/command/HelpCommands.java @@ -5,9 +5,9 @@ import java.util.HashSet; import java.util.List; import java.util.Set; -import net.citizensnpcs.CitizensBukkit; import net.citizensnpcs.api.abstraction.CommandSender; import net.citizensnpcs.api.npc.NPC; +import net.citizensnpcs.bukkit.CitizensBukkit; import net.citizensnpcs.command.Command; import net.citizensnpcs.command.CommandContext; import net.citizensnpcs.command.Requirements; diff --git a/src/main/java/net/citizensnpcs/command/command/NPCCommands.java b/src/main/java/net/citizensnpcs/command/command/NPCCommands.java index bfd3e902d..6f25bdd45 100644 --- a/src/main/java/net/citizensnpcs/command/command/NPCCommands.java +++ b/src/main/java/net/citizensnpcs/command/command/NPCCommands.java @@ -4,7 +4,6 @@ import java.security.acl.Owner; import java.util.ArrayList; import java.util.List; -import net.citizensnpcs.CitizensBukkit; import net.citizensnpcs.Settings.Setting; import net.citizensnpcs.api.CitizensAPI; import net.citizensnpcs.api.abstraction.CommandSender; @@ -13,6 +12,7 @@ import net.citizensnpcs.api.abstraction.entity.Ageable; import net.citizensnpcs.api.abstraction.entity.Player; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.api.npc.NPCRegistry; +import net.citizensnpcs.bukkit.CitizensBukkit; import net.citizensnpcs.command.Command; import net.citizensnpcs.command.CommandContext; import net.citizensnpcs.command.Requirements; diff --git a/src/main/java/net/citizensnpcs/command/command/ScriptCommands.java b/src/main/java/net/citizensnpcs/command/command/ScriptCommands.java index 5fd3d69e5..049753f24 100644 --- a/src/main/java/net/citizensnpcs/command/command/ScriptCommands.java +++ b/src/main/java/net/citizensnpcs/command/command/ScriptCommands.java @@ -2,13 +2,13 @@ package net.citizensnpcs.command.command; import java.io.File; -import net.citizensnpcs.CitizensBukkit; import net.citizensnpcs.api.CitizensAPI; import net.citizensnpcs.api.abstraction.CommandSender; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.api.scripting.CompileCallback; import net.citizensnpcs.api.scripting.Script; import net.citizensnpcs.api.scripting.ScriptFactory; +import net.citizensnpcs.bukkit.CitizensBukkit; import net.citizensnpcs.command.Command; import net.citizensnpcs.command.CommandContext; import net.citizensnpcs.command.exception.CommandException; diff --git a/src/main/java/net/citizensnpcs/editor/EquipmentEditor.java b/src/main/java/net/citizensnpcs/editor/EquipmentEditor.java index d2626c356..d26f3fb78 100644 --- a/src/main/java/net/citizensnpcs/editor/EquipmentEditor.java +++ b/src/main/java/net/citizensnpcs/editor/EquipmentEditor.java @@ -1,10 +1,10 @@ package net.citizensnpcs.editor; -import net.citizensnpcs.abstraction.bukkit.BukkitPlayer; import net.citizensnpcs.api.CitizensAPI; import net.citizensnpcs.api.abstraction.EventHandler; import net.citizensnpcs.api.abstraction.entity.Player; import net.citizensnpcs.api.npc.NPC; +import net.citizensnpcs.bukkit.BukkitPlayer; import net.citizensnpcs.util.Messaging; import org.bukkit.event.Event.Result; diff --git a/src/main/java/net/citizensnpcs/spout/CitizensSpout.java b/src/main/java/net/citizensnpcs/spout/CitizensSpout.java new file mode 100644 index 000000000..532130216 --- /dev/null +++ b/src/main/java/net/citizensnpcs/spout/CitizensSpout.java @@ -0,0 +1,18 @@ +package net.citizensnpcs.spout; + +import net.citizensnpcs.util.Messaging; + +import org.spout.api.plugin.CommonPlugin; + +public class CitizensSpout extends CommonPlugin { + + @Override + public void onDisable() { + Messaging.logF("v%s disabled.", getDescription().getVersion()); + } + + @Override + public void onEnable() { + Messaging.logF("v%s enabled.", getDescription().getVersion()); + } +} diff --git a/src/main/java/net/citizensnpcs/spout/SpoutConverter.java b/src/main/java/net/citizensnpcs/spout/SpoutConverter.java new file mode 100644 index 000000000..566e18de1 --- /dev/null +++ b/src/main/java/net/citizensnpcs/spout/SpoutConverter.java @@ -0,0 +1,40 @@ +package net.citizensnpcs.spout; + +import net.citizensnpcs.api.abstraction.ItemStack; +import net.citizensnpcs.api.abstraction.MobType; +import net.citizensnpcs.api.abstraction.World; +import net.citizensnpcs.api.abstraction.WorldVector; +import net.citizensnpcs.api.abstraction.entity.Entity; + +public class SpoutConverter { + + public static Entity toEntity(org.spout.api.entity.Entity entity) { + // TODO Auto-generated method stub + return null; + } + + public static WorldVector toWorldVector(org.spout.api.geo.discrete.Point location) { + // TODO Auto-generated method stub + return null; + } + + public static World toWorld(org.spout.api.geo.World world) { + // TODO Auto-generated method stub + return null; + } + + public static MobType toMobType(org.spout.vanilla.controller.VanillaControllerType type) { + // TODO Auto-generated method stub + return null; + } + + public static org.spout.api.inventory.ItemStack fromItemStack(ItemStack itemStack) { + // TODO Auto-generated method stub + return null; + } + + public static ItemStack toItemStack(org.spout.api.inventory.ItemStack itemInHand) { + // TODO Auto-generated method stub + return null; + } +} diff --git a/src/main/java/net/citizensnpcs/spout/SpoutEntity.java b/src/main/java/net/citizensnpcs/spout/SpoutEntity.java new file mode 100644 index 000000000..55714d98e --- /dev/null +++ b/src/main/java/net/citizensnpcs/spout/SpoutEntity.java @@ -0,0 +1,41 @@ +package net.citizensnpcs.spout; + +import java.util.List; + +import net.citizensnpcs.api.abstraction.World; +import net.citizensnpcs.api.abstraction.WorldVector; +import net.citizensnpcs.api.abstraction.entity.Entity; + +public class SpoutEntity implements Entity { + protected final org.spout.api.entity.Entity entity; + + public SpoutEntity(org.spout.api.entity.Entity entity) { + this.entity = entity; + } + + @Override + public List getNearbyEntities(double dX, double dY, double dZ) { + // TODO Auto-generated method stub + return null; + } + + @Override + public WorldVector getLocation() { + return SpoutConverter.toWorldVector(entity.getPosition()); + } + + @Override + public World getWorld() { + return SpoutConverter.toWorld(entity.getWorld()); + } + + @Override + public void remove() { + entity.kill(); + } + + @Override + public void setRotation(double yaw, double pitch) { + entity.setRotation(entity.getRotation().rotate((float) pitch, entity.getPosition().getX(), entity.getPosition().getY(), entity.getPosition().getZ())); + } +} diff --git a/src/main/java/net/citizensnpcs/spout/SpoutPlayer.java b/src/main/java/net/citizensnpcs/spout/SpoutPlayer.java new file mode 100644 index 000000000..893b4e837 --- /dev/null +++ b/src/main/java/net/citizensnpcs/spout/SpoutPlayer.java @@ -0,0 +1,101 @@ +package net.citizensnpcs.spout; + +import org.spout.vanilla.controller.VanillaControllerTypes; +import org.spout.vanilla.controller.living.player.VanillaPlayer; +import org.spout.vanilla.controller.source.HealthChangeReason; + +import net.citizensnpcs.api.abstraction.Equipment; +import net.citizensnpcs.api.abstraction.ItemStack; +import net.citizensnpcs.api.abstraction.MobType; +import net.citizensnpcs.api.abstraction.entity.Player; + +public class SpoutPlayer extends SpoutEntity implements Player { + private final VanillaPlayer player; + + public SpoutPlayer(VanillaPlayer player) { + super(player.getParent()); + this.player = player; + } + + @Override + public int getHealth() { + return player.getHealth(); + } + + @Override + public MobType getType() { + return SpoutConverter.toMobType(VanillaControllerTypes.PLAYER); + } + + @Override + public void setHealth(int health) { + player.setHealth(health, HealthChangeReason.UNKNOWN); + } + + @Override + public String getName() { + return player.getPlayer().getName(); + } + + @Override + public boolean hasPermission(String perm) { + return player.getPlayer().hasPermission(perm); + } + + @Override + public void sendMessage(String message) { + player.getPlayer().sendMessage(message); + } + + @Override + public void useCommand(String cmd) { + // TODO Auto-generated method stub + + } + + @Override + public ItemStack getEquipment(Equipment slot) { + switch (slot) { + case CARRIED: + return SpoutConverter.toItemStack(player.getInventory().getCurrentItem()); + case HELMET: + return SpoutConverter.toItemStack(player.getInventory().getHelmet()); + case BOOTS: + return SpoutConverter.toItemStack(player.getInventory().getBoots()); + case CHESTPLATE: + return SpoutConverter.toItemStack(player.getInventory().getChestPlate()); + case LEGGINGS: + return SpoutConverter.toItemStack(player.getInventory().getLeggings()); + default: + return null; + } + } + + @Override + public void setEquipment(Equipment slot, ItemStack item) { + switch (slot) { + case CARRIED: + player.getInventory().setCurrentItem(SpoutConverter.fromItemStack(item)); + case HELMET: + player.getInventory().setItem(0, SpoutConverter.fromItemStack(item)); + case BOOTS: + player.getInventory().setItem(3, SpoutConverter.fromItemStack(item)); + case CHESTPLATE: + player.getInventory().setItem(1, SpoutConverter.fromItemStack(item)); + case LEGGINGS: + player.getInventory().setItem(2, SpoutConverter.fromItemStack(item)); + } + } + + @Override + public boolean isOnline() { + return player.getPlayer().isOnline(); + } + + @Override + public void setArmor(ItemStack[] armor) { + for (int i = 0; i < armor.length; i++) { + player.getInventory().setItem(i, SpoutConverter.fromItemStack(armor[i])); + } + } +} diff --git a/src/main/java/net/citizensnpcs/spout/SpoutServer.java b/src/main/java/net/citizensnpcs/spout/SpoutServer.java new file mode 100644 index 000000000..bc0296f8f --- /dev/null +++ b/src/main/java/net/citizensnpcs/spout/SpoutServer.java @@ -0,0 +1,51 @@ +package net.citizensnpcs.spout; + +import org.spout.api.event.Event; +import org.spout.api.event.HandlerList; +import org.spout.api.event.Listener; +import org.spout.api.scheduler.TaskPriority; + +import net.citizensnpcs.api.abstraction.Server; + +public class SpoutServer implements Server { + private final CitizensSpout plugin; + + public SpoutServer(CitizensSpout plugin) { + this.plugin = plugin; + } + + @Override + public void callEvent(Object event) { + plugin.getGame().getEventManager().callEvent((Event) event); + } + + @Override + public void registerEvents(Object listener) { + plugin.getGame().getEventManager().registerEvents((Listener) listener, plugin); + } + + @Override + public void schedule(Runnable task) { + plugin.getGame().getScheduler().scheduleSyncDelayedTask(plugin, task); + } + + @Override + public void schedule(Runnable task, long delay) { + plugin.getGame().getScheduler().scheduleSyncDelayedTask(plugin, task, delay, TaskPriority.NORMAL); + } + + @Override + public void scheduleRepeating(Runnable task, long delay) { + plugin.getGame().getScheduler().scheduleSyncRepeatingTask(plugin, task, 0, delay, TaskPriority.NORMAL); + } + + @Override + public void scheduleRepeating(Runnable task, long initialDelay, long repeatDelay) { + plugin.getGame().getScheduler().scheduleSyncRepeatingTask(plugin, task, initialDelay, repeatDelay, TaskPriority.NORMAL); + } + + @Override + public void unregisterAll(Object listener) { + HandlerList.unregisterAll(); + } +} diff --git a/src/main/java/net/citizensnpcs/util/Messaging.java b/src/main/java/net/citizensnpcs/util/Messaging.java index 6b2daf842..9ce4620df 100644 --- a/src/main/java/net/citizensnpcs/util/Messaging.java +++ b/src/main/java/net/citizensnpcs/util/Messaging.java @@ -4,6 +4,7 @@ import java.security.acl.Owner; import java.util.Arrays; import java.util.logging.Level; +import net.citizensnpcs.Citizens; import net.citizensnpcs.Settings.Setting; import net.citizensnpcs.api.abstraction.CommandSender; import net.citizensnpcs.api.abstraction.entity.Player; @@ -20,7 +21,7 @@ public class Messaging { } public static void log(Level level, Object... msg) { - Bukkit.getLogger().log(level, "[Citizens] " + SPACE.join(msg)); + Citizens.getLogger().log(level, "[Citizens] " + SPACE.join(msg)); } public static void log(Object... msg) { @@ -79,4 +80,4 @@ public class Messaging { public static void severeF(Object... messages) { log(Level.SEVERE, getFormatted(messages)); } -} \ No newline at end of file +} diff --git a/src/main/java/net/citizensnpcs/util/Util.java b/src/main/java/net/citizensnpcs/util/Util.java index 7c6674e2c..ae22aced4 100644 --- a/src/main/java/net/citizensnpcs/util/Util.java +++ b/src/main/java/net/citizensnpcs/util/Util.java @@ -8,6 +8,8 @@ import java.util.Map; import javax.xml.stream.Location; +import org.apache.commons.lang.Validate; + import net.citizensnpcs.Settings.Setting; import net.citizensnpcs.api.abstraction.Material; import net.citizensnpcs.api.abstraction.World;