mirror of
https://e.coding.net/circlecloud/Soulbound.git
synced 2024-11-24 02:09:08 +00:00
修复背包满时扔出绑定物品导致物品消失问题
This commit is contained in:
parent
e20796ff6b
commit
ed8d9d02ca
@ -77,6 +77,10 @@ public class PlayerListener implements Listener {
|
|||||||
if (ItemUtils.isBindOnPickup(itemStack) || ItemsConfig.isActionItem(itemStack, ActionType.PICKUP_ITEM)) {
|
if (ItemUtils.isBindOnPickup(itemStack) || ItemsConfig.isActionItem(itemStack, ActionType.PICKUP_ITEM)) {
|
||||||
ItemUtils.soulbindItem(player, itemStack);
|
ItemUtils.soulbindItem(player, itemStack);
|
||||||
}
|
}
|
||||||
|
if(player.getItemOnCursor()!=null && ItemUtils.isSoulbound(player.getItemOnCursor())){
|
||||||
|
item.setPickupDelay(40);
|
||||||
|
event.setCancelled(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -91,7 +95,7 @@ public class PlayerListener implements Listener {
|
|||||||
final String command = event.getMessage();
|
final String command = event.getMessage();
|
||||||
|
|
||||||
if (ItemUtils.isSoulbound(itemStack) && Config.getBlockedCommands().contains(command)) {
|
if (ItemUtils.isSoulbound(itemStack) && Config.getBlockedCommands().contains(command)) {
|
||||||
player.sendMessage(ChatColor.RED + "不允许使用命令 " + ChatColor.GOLD + command + ChatColor.RED + " 当拿着绑定物品的时候.");
|
player.sendMessage(ChatColor.RED + "涓嶅厑璁镐娇鐢ㄥ懡浠<EFBFBD> " + ChatColor.GOLD + command + ChatColor.RED + " 褰撴嬁鐫<EFBFBD>缁戝畾鐗╁搧鐨勬椂鍊<EFBFBD>.");
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user