1
0
mirror of https://e.coding.net/circlecloud/Soulbound.git synced 2024-11-22 01:49:09 +00:00

Remove UUID Bound...

Signed-off-by: j502647092 <jtb1@163.com>
This commit is contained in:
j502647092 2015-04-29 10:18:23 +08:00
parent 70d7d7f6a0
commit 9c3fa9c3ab
2 changed files with 4 additions and 6 deletions

View File

@ -58,7 +58,6 @@ public class PlayerListener implements Listener {
if (Permissions.pickupBypass(player)) {
return;
}
event.setCancelled(true);
return;
}

View File

@ -51,7 +51,7 @@ public class ItemUtils {
itemLore.addAll(oldLore);
}
itemLore.add(Misc.SOULBOUND_TAG + StringUtils.hideUUID(player.getUniqueId()));
itemLore.add(Misc.SOULBOUND_TAG);
if (Config.getInstance().getShowNameInLore()) {
itemLore.add(player.getName());
@ -143,9 +143,11 @@ public class ItemUtils {
List<String> itemLore = new ArrayList<String>();
itemLore.addAll(oldLore);
int index = StringUtils.getIndexOfSoulbound(itemLore);
if (index == -1){
return null;
}
itemLore.remove(index);
if (index<itemLore.size())
itemLore.remove(index);
@ -224,10 +226,7 @@ public class ItemUtils {
checkNameChange(player, itemStack);
List<String> itemLore = itemStack.getItemMeta().getLore();
Soulbound.p.debug("UUID MATCH? " + player.getUniqueId().equals(StringUtils.readUUIDFromLore(itemLore)));
Soulbound.p.debug("NAME MATCH? " + itemLore.contains(player.getName()));
return player.getUniqueId().equals(StringUtils.readUUIDFromLore(itemLore)) || itemLore.contains(player.getName());
return itemLore.contains(player.getName());
}
private static ItemStack updateOldLore(Player player, ItemStack itemStack) {