Also unsit player on death

This commit is contained in:
Shevchik 2013-12-15 12:06:04 +04:00
parent e6f97895c9
commit 28d22a7a95

View File

@ -15,6 +15,7 @@ import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.block.Action;
import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.event.entity.PlayerDeathEvent;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerQuitEvent;
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>();
@EventHandler(priority=EventPriority.LOWEST)
public void onExitVehicle(VehicleExitEvent e)