Fixed start-up bug.

This commit is contained in:
Steffion 2013-07-31 14:29:10 +02:00
parent 2c6b95003a
commit c1c7e964a3
2 changed files with 10 additions and 3 deletions

View File

@ -4,9 +4,11 @@ import nl.Steffion.BlockHunt.Listeners.PlayerListener;
import nl.Steffion.BlockHunt.Managers.CommandC; import nl.Steffion.BlockHunt.Managers.CommandC;
import nl.Steffion.BlockHunt.Managers.ConfigC; import nl.Steffion.BlockHunt.Managers.ConfigC;
import nl.Steffion.BlockHunt.Managers.MessageM; import nl.Steffion.BlockHunt.Managers.MessageM;
import nl.Steffion.BlockHunt.Serializables.LocationSerializable;
import org.bukkit.command.Command; import org.bukkit.command.Command;
import org.bukkit.command.CommandSender; import org.bukkit.command.CommandSender;
import org.bukkit.configuration.serialization.ConfigurationSerialization;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.Listener; import org.bukkit.event.Listener;
import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.plugin.java.JavaPlugin;
@ -17,10 +19,15 @@ public class BlockHunt extends JavaPlugin implements Listener {
*/ */
public void onEnable() { public void onEnable() {
W.newFiles();
getServer().getPluginManager().registerEvents(this, this); getServer().getPluginManager().registerEvents(this, this);
getServer().getPluginManager().registerEvents(new PlayerListener(), getServer().getPluginManager().registerEvents(new PlayerListener(),
this); this);
ConfigurationSerialization.registerClass(LocationSerializable.class,
"Location");
W.newFiles();
MessageM.sendFMessage(null, ConfigC.log_Enabled, true, "name-" MessageM.sendFMessage(null, ConfigC.log_Enabled, true, "name-"
+ W.pluginName, "version-" + W.pluginVersion, "autors-" + W.pluginName, "version-" + W.pluginVersion, "autors-"
+ W.pluginAutors); + W.pluginAutors);

View File

@ -55,8 +55,8 @@ public class LocationSerializable extends Location implements
if (w == null) { if (w == null) {
MessageM.sendMessage( MessageM.sendMessage(
null, null,
"%EError deserializing LocationSerializable - world not found!", "%EError deserializing LocationSerializable - world not found! (%A%w%%E)",
true); true, "w-" + w);
return null; return null;
} }
return new LocationSerializable(w, (Double) M.g(map, "x", 0D), return new LocationSerializable(w, (Double) M.g(map, "x", 0D),