Remove all of the types from a player's inventory when jailed and an

item is in their inventory.
This commit is contained in:
graywolf336 2014-07-14 23:30:37 -05:00
parent 3226515107
commit 9e0722c218

View File

@ -224,13 +224,15 @@ public class PrisonerManager {
}else {
for(ItemStack item : player.getInventory().getContents()) {
if(Util.isStringInsideList(blacklist, item.getType().toString())) {
player.getInventory().remove(item);
pl.debug("Removing " + item.getType() + " from " + player.getName() + "'s (" + player.getUniqueId().toString() + ") inventory.");
player.getInventory().remove(item.getType());
}
}
for(ItemStack item : player.getInventory().getArmorContents()) {
if(Util.isStringInsideList(blacklist, item.getType().toString())) {
player.getInventory().remove(item);
pl.debug("Removing " + item.getType() + " from " + player.getName() + "'s (" + player.getUniqueId().toString() + ") inventory.");
player.getInventory().remove(item.getType());
}
}