示例#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;
 }
示例#2
0
 public static void loadDestinations() {
   for (Destination dest : Destination.values()) loadDestination(dest);
 }
示例#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"));
 }