Don't allow players to keep their inventory from jail.
This commit is contained in:
parent
720d4c1608
commit
3226515107
1
.gitignore
vendored
1
.gitignore
vendored
@ -44,3 +44,4 @@ config.yml
|
|||||||
src/com/matejdro/
|
src/com/matejdro/
|
||||||
/dependency-reduced-pom.xml
|
/dependency-reduced-pom.xml
|
||||||
/global.yml
|
/global.yml
|
||||||
|
/data.yml
|
||||||
|
@ -377,6 +377,11 @@ public class PrisonerManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Now, let's restore their inventory
|
//Now, let's restore their inventory
|
||||||
|
//First up, clear their inventory
|
||||||
|
player.closeInventory();
|
||||||
|
player.getInventory().setArmorContents(null);
|
||||||
|
player.getInventory().clear();
|
||||||
|
|
||||||
//if the cell isn't null, let's check if the cell has a chest and if so then try out best to restore
|
//if the cell isn't null, let's check if the cell has a chest and if so then try out best to restore
|
||||||
//the prisoner's inventory from that
|
//the prisoner's inventory from that
|
||||||
if(cell != null) {
|
if(cell != null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user