コード例 #1
0
  private static boolean queuePlayer(String playername, int dim, ChunkCoordinates dest) {

    if (!teleportQueue.isQueued(playername)) {
      return teleportQueue.addToQueue(playername, dim, dest.posX, dest.posY, dest.posZ);
    }
    return false;
  }
コード例 #2
0
  public static boolean sendToDefaultSpawn(String playername) {

    if (MinecraftServer.getServer().getConfigurationManager().func_152612_a(playername) != null) {
      EntityPlayerMP player =
          MinecraftServer.getServer().getConfigurationManager().func_152612_a(playername);
      if (player.getBedLocation(0) != null) {
        return sendToBed(playername);
      } else {
        return sendToDimension(playername, 0);
      }
    }
    teleportQueue.addToQueue(playername);
    return false;
  }