Fix a bug where the chat was closed on teleport
This commit is contained in:
parent
ed1f0a6024
commit
900009b103
|
@ -6,12 +6,15 @@ import org.bukkit.event.player.PlayerTeleportEvent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A fix for a CraftBukkit bug.
|
* A fix for a CraftBukkit bug.
|
||||||
|
*
|
||||||
* @author Acrobot
|
* @author Acrobot
|
||||||
*/
|
*/
|
||||||
public class PlayerTeleport implements Listener {
|
public class PlayerTeleport implements Listener {
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public static void onPlayerTeleport(PlayerTeleportEvent event) {
|
public static void onPlayerTeleport(PlayerTeleportEvent event) {
|
||||||
event.getPlayer().closeInventory();
|
if (!event.getPlayer().isConversing()) {
|
||||||
|
event.getPlayer().closeInventory();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue