Ejemplo n.º 1
0
 public static Location getLocation(Destination dest) {
   if (dest.equals(Destination.MOON)) {
     if (moon == null) loadLocations();
     return moon;
   } else if (dest.equals(Destination.HOME)) {
     if (home == null) loadLocations();
     return home;
   }
   return null;
 }
Ejemplo n.º 2
0
 public static void loadDestinations() {
   for (Destination dest : Destination.values()) loadDestination(dest);
 }
Ejemplo n.º 3
0
 public static void loadDestination(Destination dest) {
   if (AvoidTheVoid.getPlugin().getConfig().contains(dest.toString().toLowerCase() + "lever"))
     levers.put(
         dest,
         AvoidTheVoid.getPlugin().getConfig().getString(dest.toString().toLowerCase() + "lever"));
 }