}
public void run(int id) {
Entity e = SpoutClient.getInstance().getEntityFromId(entityId);
if (e != null && e instanceof EntityLivingBase) {
CraftLivingEntity living = (CraftLivingEntity)e.spoutEnty;
// Check to see if this title is our username, if so, use defaults
if (e instanceof EntityPlayer) {
EntityPlayer player = (EntityPlayer)e;
if (player.vip != null && title.equals(player.username)) {
title = player.vip.getTitle();
}
}
if (title.equals("reset")) {
living.resetTitle();
SpoutcraftWorld spworld = (SpoutcraftWorld) living.getWorld();
spworld.getHandle().customTitles.remove(entityId);
} else {
living.setTitle(title);
SpoutcraftWorld spworld = (SpoutcraftWorld) living.getWorld();
spworld.getHandle().customTitles.put(living.getEntityId(), title);
}
}
}