Properly eject player
Actually i don't know why it works like that
This commit is contained in:
parent
e6d1a1ed76
commit
aa26c6626a
@ -189,13 +189,8 @@ public class Chairs extends JavaPlugin {
|
||||
final Entity arrow = sit.get(player.getName());
|
||||
sit.remove(player.getName());
|
||||
player.eject();
|
||||
Bukkit.getScheduler().scheduleSyncDelayedTask(this, new Runnable()
|
||||
{
|
||||
public void run()
|
||||
{
|
||||
arrow.remove();
|
||||
}
|
||||
},20);
|
||||
player.eject();
|
||||
arrow.remove();
|
||||
final Location tploc = sitstopteleportloc.get(player.getName());
|
||||
if (tploc != null && !ignoretp)
|
||||
{
|
||||
|
@ -45,11 +45,17 @@ public class EventListener implements Listener {
|
||||
{
|
||||
if (e.getVehicle().getPassenger() instanceof Player)
|
||||
{
|
||||
Player player = (Player) e.getVehicle().getPassenger();
|
||||
final Player player = (Player) e.getVehicle().getPassenger();
|
||||
if (plugin.sit.containsKey(player.getName()))
|
||||
{
|
||||
e.setCancelled(true);
|
||||
plugin.unSitPlayer(player, false);
|
||||
Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable()
|
||||
{
|
||||
public void run()
|
||||
{
|
||||
plugin.unSitPlayer(player, false);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user