Also unsit player on death
This commit is contained in:
parent
e6f97895c9
commit
28d22a7a95
@ -15,6 +15,7 @@ import org.bukkit.event.EventPriority;
|
|||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.block.Action;
|
import org.bukkit.event.block.Action;
|
||||||
import org.bukkit.event.block.BlockBreakEvent;
|
import org.bukkit.event.block.BlockBreakEvent;
|
||||||
|
import org.bukkit.event.entity.PlayerDeathEvent;
|
||||||
import org.bukkit.event.player.PlayerInteractEvent;
|
import org.bukkit.event.player.PlayerInteractEvent;
|
||||||
import org.bukkit.event.player.PlayerQuitEvent;
|
import org.bukkit.event.player.PlayerQuitEvent;
|
||||||
import org.bukkit.event.vehicle.VehicleExitEvent;
|
import org.bukkit.event.vehicle.VehicleExitEvent;
|
||||||
@ -42,6 +43,16 @@ public class EventListener implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@EventHandler(priority=EventPriority.LOWEST)
|
||||||
|
public void onPlayerDeath(PlayerDeathEvent event)
|
||||||
|
{
|
||||||
|
Player player = event.getEntity();
|
||||||
|
if (plugin.sit.containsKey(player.getName()))
|
||||||
|
{
|
||||||
|
plugin.unSitPlayer(player,true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private HashSet<String> queueUnsit = new HashSet<String>();
|
private HashSet<String> queueUnsit = new HashSet<String>();
|
||||||
@EventHandler(priority=EventPriority.LOWEST)
|
@EventHandler(priority=EventPriority.LOWEST)
|
||||||
public void onExitVehicle(VehicleExitEvent e)
|
public void onExitVehicle(VehicleExitEvent e)
|
||||||
|
Loading…
Reference in New Issue
Block a user