mirror of
https://e.coding.net/circlecloud/Soulbound.git
synced 2024-11-21 01:39:10 +00:00
Remove UUID Bound...
Signed-off-by: j502647092 <jtb1@163.com>
This commit is contained in:
parent
70d7d7f6a0
commit
9c3fa9c3ab
@ -58,7 +58,6 @@ public class PlayerListener implements Listener {
|
||||
if (Permissions.pickupBypass(player)) {
|
||||
return;
|
||||
}
|
||||
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user