Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void setPresistedData(EntityPlayer player, String key, String value)
- {
- NBTTagCompound presistedData = player.getEntityData().getCompoundTag(player.PERSISTED_NBT_TAG);
- if (presistedData == null)
- presistedData = new NBTTagCompound();
- presistedData.setString(key, value);
- player.getEntityData().setTag(player.PERSISTED_NBT_TAG, presistedData);
- }
- public static String getPresistedData(EntityPlayer player, String key)
- {
- return player.getEntityData().getCompoundTag(player.PERSISTED_NBT_TAG).getString(key);
- }
- public static boolean hasPresistedData(EntityPlayer player, String key)
- {
- return player.getEntityData().getCompoundTag(player.PERSISTED_NBT_TAG).hasKey(key);
- }
Add Comment
Please, Sign In to add comment