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:
parent
70d7d7f6a0
commit
9c3fa9c3ab
@ -58,7 +58,6 @@ public class PlayerListener implements Listener {
|
|||||||
if (Permissions.pickupBypass(player)) {
|
if (Permissions.pickupBypass(player)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,7 @@ public class ItemUtils {
|
|||||||
itemLore.addAll(oldLore);
|
itemLore.addAll(oldLore);
|
||||||
}
|
}
|
||||||
|
|
||||||
itemLore.add(Misc.SOULBOUND_TAG + StringUtils.hideUUID(player.getUniqueId()));
|
itemLore.add(Misc.SOULBOUND_TAG);
|
||||||
|
|
||||||
if (Config.getInstance().getShowNameInLore()) {
|
if (Config.getInstance().getShowNameInLore()) {
|
||||||
itemLore.add(player.getName());
|
itemLore.add(player.getName());
|
||||||
@ -143,9 +143,11 @@ public class ItemUtils {
|
|||||||
List<String> itemLore = new ArrayList<String>();
|
List<String> itemLore = new ArrayList<String>();
|
||||||
itemLore.addAll(oldLore);
|
itemLore.addAll(oldLore);
|
||||||
int index = StringUtils.getIndexOfSoulbound(itemLore);
|
int index = StringUtils.getIndexOfSoulbound(itemLore);
|
||||||
|
|
||||||
if (index == -1){
|
if (index == -1){
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
itemLore.remove(index);
|
itemLore.remove(index);
|
||||||
if (index<itemLore.size())
|
if (index<itemLore.size())
|
||||||
itemLore.remove(index);
|
itemLore.remove(index);
|
||||||
@ -224,10 +226,7 @@ public class ItemUtils {
|
|||||||
checkNameChange(player, itemStack);
|
checkNameChange(player, itemStack);
|
||||||
List<String> itemLore = itemStack.getItemMeta().getLore();
|
List<String> itemLore = itemStack.getItemMeta().getLore();
|
||||||
|
|
||||||
Soulbound.p.debug("UUID MATCH? " + player.getUniqueId().equals(StringUtils.readUUIDFromLore(itemLore)));
|
return itemLore.contains(player.getName());
|
||||||
Soulbound.p.debug("NAME MATCH? " + itemLore.contains(player.getName()));
|
|
||||||
|
|
||||||
return player.getUniqueId().equals(StringUtils.readUUIDFromLore(itemLore)) || itemLore.contains(player.getName());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ItemStack updateOldLore(Player player, ItemStack itemStack) {
|
private static ItemStack updateOldLore(Player player, ItemStack itemStack) {
|
||||||
|
Loading…
Reference in New Issue
Block a user