public Map<String, Object> serialize() { Map<String, Object> result = new LinkedHashMap<String, Object>(); result.put("UUID", profile.getId().toString()); return result; }
@Override public void b(PacketDataSerializer packetdataserializer) throws IOException { // CraftBukkit - added throws packetdataserializer.b(a); UUID uuid = b.getId(); // Spigot start - protocol patch if (packetdataserializer.version < 20) { packetdataserializer.a( uuid == null ? "" : packetdataserializer.version >= 5 ? uuid.toString() : uuid.toString().replaceAll("-", "")); // Spigot packetdataserializer.a( b.getName().length() > 16 ? b.getName().substring(0, 16) : b.getName()); // CraftBukkit - Limit name length to 16 characters if (packetdataserializer.version >= 5) { // Spigot packetdataserializer.b(b.getProperties().size()); Iterator iterator = b.getProperties().values().iterator(); while (iterator.hasNext()) { Property property = (Property) iterator.next(); packetdataserializer.a(property.getName()); packetdataserializer.a(property.getValue()); packetdataserializer.a(property.getSignature()); } } } else { packetdataserializer.writeUUID(uuid); } // Spigot end packetdataserializer.writeInt(c); packetdataserializer.writeInt(d); packetdataserializer.writeInt(e); packetdataserializer.writeByte(f); packetdataserializer.writeByte(g); // Spigot start - protocol patch if (packetdataserializer.version >= 47) { packetdataserializer.writeShort(org.spigotmc.SpigotDebreakifier.getItemId(h)); } else { packetdataserializer.writeShort(h); } i.a(packetdataserializer); }
public UUID getUniqueId() { return profile.getId(); }
@Override public String toString() { return getClass().getSimpleName() + "[UUID=" + profile.getId() + "]"; }