boolean set(NBTTagCompound data, String value, Player player) { String lower = value.toLowerCase(); if ("true".startsWith(lower)) { data.setByte(_nbtKey, (byte) 1); } else if ("false".startsWith(lower)) { data.setByte(_nbtKey, (byte) 0); } else { return false; } return true; }
String get(NBTTagCompound data) { if (data.hasKey(_nbtKey)) { return (data.getByte(_nbtKey) > 0 ? "true" : "false"); } return null; }