Updated to the new Configuration api

By: Nathan Adams <dinnerbone@dinnerbone.com>
This commit is contained in:
CraftBukkit/Spigot
2011-10-10 21:10:48 +01:00
parent e35d160db6
commit f9067422f1
5 changed files with 93 additions and 42 deletions

View File

@@ -2,6 +2,8 @@ package org.bukkit.craftbukkit.entity;
import java.net.InetSocketAddress;
import java.net.SocketAddress;
import java.util.LinkedHashMap;
import java.util.Map;
import net.minecraft.server.EntityHuman;
import net.minecraft.server.EntityPlayer;
import net.minecraft.server.Packet131;
@@ -24,6 +26,8 @@ import org.bukkit.Material;
import org.bukkit.Note;
import org.bukkit.Statistic;
import org.bukkit.World;
import org.bukkit.configuration.serialization.DelegateDeserialization;
import org.bukkit.craftbukkit.CraftOfflinePlayer;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.craftbukkit.CraftWorld;
import org.bukkit.craftbukkit.map.CraftMapView;
@@ -33,6 +37,7 @@ import org.bukkit.event.player.PlayerGameModeChangeEvent;
import org.bukkit.event.player.PlayerTeleportEvent;
import org.bukkit.map.MapView;
@DelegateDeserialization(CraftOfflinePlayer.class)
public class CraftPlayer extends CraftHumanEntity implements Player {
public CraftPlayer(CraftServer server, EntityPlayer entity) {
super(server, entity);
@@ -535,4 +540,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return null;
}
}
public Map<String, Object> serialize() {
Map<String, Object> result = new LinkedHashMap<String, Object>();
result.put("name", getName());
return result;
}
}