示例#1
0
 public static TownTeleport getByIcon(int icon) {
   for (TownTeleport town : TownTeleport.values()) {
     if (town.getIcon() == icon) {
       return town;
     }
   }
   return null; // Default
 }
示例#2
0
 public static String getTownTeleportSelection() {
   String mapselect = "";
   for (TownTeleport gate : TownTeleport.values()) {
     mapselect += "#" + gate.getIcon() + "#" + gate.getName();
   }
   if (mapselect == null || "".equals(mapselect)) {
     mapselect = "#-1# There are no locations you can move to.";
   }
   return mapselect;
 }
示例#3
0
 public static int getTownLocation(int icon) {
   return TownTeleport.getByIcon(icon) != null
       ? TownTeleport.getByIcon(icon).getMap()
       : TownTeleport.TOWN_0.getMap();
 }