mirror of
https://e.coding.net/circlecloud/ProtectItem.git
synced 2024-12-27 20:48:51 +00:00
fix item null or AIR...
Signed-off-by: j502647092 <jtb1@163.com>
This commit is contained in:
parent
82cf576315
commit
6be962b13a
@ -4,6 +4,7 @@ import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
@ -51,6 +52,9 @@ public class ItemManager {
|
||||
}
|
||||
|
||||
public boolean canAction(final ItemStack i, final ActionType action) {
|
||||
if (i == null || i.getType() == Material.AIR) {
|
||||
return true;
|
||||
}
|
||||
final String itemname = getItemName(i);
|
||||
final List<ActionType> actlist = itemlist.get(itemname);
|
||||
if (actlist == null) {
|
||||
|
Loading…
Reference in New Issue
Block a user