mirror of
https://github.com/garbagemule/MobArena.git
synced 2024-11-23 19:16:41 +01:00
Fixed inventory exploit.
This commit is contained in:
parent
44a3d0754c
commit
cb39b97c80
BIN
MobArena.jar
BIN
MobArena.jar
Binary file not shown.
@ -5,6 +5,8 @@ import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.Inventory;
|
||||
import org.bukkit.inventory.InventoryView;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.PlayerInventory;
|
||||
|
||||
@ -86,6 +88,14 @@ public class InventoryManager
|
||||
inv.setChestplate(null);
|
||||
inv.setLeggings(null);
|
||||
inv.setBoots(null);
|
||||
InventoryView view = p.getOpenInventory();
|
||||
if (view != null) {
|
||||
view.setCursor(null);
|
||||
Inventory i = view.getTopInventory();
|
||||
if (i != null) {
|
||||
i.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private boolean saveToFile(Player p) {
|
||||
|
Loading…
Reference in New Issue
Block a user