Remove all of the types from a player's inventory when jailed and an
item is in their inventory.
This commit is contained in:
parent
3226515107
commit
9e0722c218
@ -224,13 +224,15 @@ public class PrisonerManager {
|
|||||||
}else {
|
}else {
|
||||||
for(ItemStack item : player.getInventory().getContents()) {
|
for(ItemStack item : player.getInventory().getContents()) {
|
||||||
if(Util.isStringInsideList(blacklist, item.getType().toString())) {
|
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()) {
|
for(ItemStack item : player.getInventory().getArmorContents()) {
|
||||||
if(Util.isStringInsideList(blacklist, item.getType().toString())) {
|
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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user