类 PlayerSpawnLocationEvent

java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
org.spigotmc.event.player.PlayerSpawnLocationEvent

public class PlayerSpawnLocationEvent extends PlayerEvent
当玩家加入服务器后, 准备在某世界出生时触发本事件.
  • 构造器详细资料

    • PlayerSpawnLocationEvent

      public PlayerSpawnLocationEvent(Player who, Location spawnLocation)
  • 方法详细资料

    • getSpawnLocation

      public Location getSpawnLocation()
      获取玩家的出生点. 如果此玩家曾在此服务器游戏过(OfflinePlayer.hasPlayedBefore()), 本位置将默认为player.dat文件中的值. 对于新玩家, 默认的出生点为主世界的出生点.

      原文:Gets player's spawn location. If the player OfflinePlayer.hasPlayedBefore(), it's going to default to the location inside player.dat file. For new players, the default spawn location is spawn of the main Bukkit world.

      返回:
      出生点
    • setSpawnLocation

      public void setSpawnLocation(Location location)
      设置玩家的出生点 (仅在本事件中生效).

      原文:Sets player's spawn location.

      参数:
      location - 出生点
    • getHandlers

      public HandlerList getHandlers()
      指定者:
      getHandlers 在类中 Event
    • getHandlerList

      public static HandlerList getHandlerList()