Fixed the death listener

This commit is contained in:
disclearing 2019-09-11 00:17:29 +01:00 committed by GitHub
parent 8dad838827
commit 5222ed73ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -111,6 +111,8 @@ public class DeathListener implements Listener {
if (Bukkit.spigot().getTPS()[0] > 15.0D) {
PlayerInventoryContents.put(player.getUniqueId(), player.getInventory().getContents());
PlayerArmorContents.put(player.getUniqueId(), player.getInventory().getArmorContents());
player.getInventory().clear();
player.getInventory().setArmorContents(null);
Location location = player.getLocation();
((CraftWorld) location.getWorld()).getHandle();
for (Player target : Bukkit.getOnlinePlayers()) {