This commit is contained in:
Matheus 2024-06-13 23:39:06 -04:00
parent 304d6f4460
commit 7e1ac481ba

View File

@ -759,12 +759,15 @@ public class PlayerListener implements Listener {
final Player player = event.getEntity(); final Player player = event.getEntity();
final PlayerData playerData = this.plugin.getPlayerManager().getPlayerData(player.getUniqueId()); final PlayerData playerData = this.plugin.getPlayerManager().getPlayerData(player.getUniqueId());
//player.setVelocity(new Vector()); //player.setVelocity(new Vector());
PlayerUtil.animateDeath(player, false);
switch (playerData.getPlayerState()) { switch (playerData.getPlayerState()) {
case FIGHTING: case FIGHTING:
if (plugin.getMatchManager().getMatch(playerData) != null) {
PlayerUtil.animateDeath(player, !plugin.getMatchManager().getMatch(playerData).isPartyMatch());
}
this.plugin.getMatchManager().removeFighter(player, playerData, true); this.plugin.getMatchManager().removeFighter(player, playerData, true);
break; break;
case FFA: case FFA:
PlayerUtil.animateDeath(player, false);
for (ItemStack item : player.getInventory().getContents()) { for (ItemStack item : player.getInventory().getContents()) {
if (item != null && item.getType() == Material.MUSHROOM_SOUP) { if (item != null && item.getType() == Material.MUSHROOM_SOUP) {
this.plugin.getFfaManager().getItemTracker().put(player.getWorld().dropItemNaturally(player.getLocation(), item), System.currentTimeMillis()); this.plugin.getFfaManager().getItemTracker().put(player.getWorld().dropItemNaturally(player.getLocation(), item), System.currentTimeMillis());