Exemplo n.º 1
0
  public static UUID getUuid(OfflinePlayer offlinePlayer) {
    if (offlinePlayer instanceof Player) {
      return TFM_PlayerData.getPlayerData((Player) offlinePlayer).getUniqueId();
    }

    return getUuid(offlinePlayer.getName());
  }
Exemplo n.º 2
0
 public static void buildHistory(Location location, int length, TFM_PlayerData playerdata) {
   final Block center = location.getBlock();
   for (int xOffset = -length; xOffset <= length; xOffset++) {
     for (int yOffset = -length; yOffset <= length; yOffset++) {
       for (int zOffset = -length; zOffset <= length; zOffset++) {
         final Block block = center.getRelative(xOffset, yOffset, zOffset);
         playerdata.insertHistoryBlock(block.getLocation(), block.getType());
       }
     }
   }
 }