mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-30 02:05:41 +00:00
fixed it yeet
This commit is contained in:
parent
f0aec56186
commit
97caed9313
@ -10,6 +10,7 @@ import me.totalfreedom.totalfreedommod.config.ConfigEntry;
|
||||
import me.totalfreedom.totalfreedommod.util.FLog;
|
||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||
import me.totalfreedom.totalfreedommod.util.Groups;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.attribute.Attribute;
|
||||
@ -18,6 +19,7 @@ import org.bukkit.block.ShulkerBox;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Minecart;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.Tameable;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
@ -238,6 +240,16 @@ public class EventBlocker extends FreedomService
|
||||
@EventHandler(priority = EventPriority.NORMAL)
|
||||
public void onPlayerDeath(PlayerDeathEvent event)
|
||||
{
|
||||
for (Player p : Bukkit.getOnlinePlayers())
|
||||
{
|
||||
for (Entity passengerEntity : p.getPassengers())
|
||||
{
|
||||
if (passengerEntity == event.getEntity())
|
||||
{
|
||||
p.removePassenger(passengerEntity);
|
||||
}
|
||||
}
|
||||
}
|
||||
event.setDeathMessage(event.getDeathMessage());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user