Пример #1
0
  public static AthionMaps getMap(final String name) {
    final String worldname = name.toLowerCase();

    if (AthionPlots.AthionMaps.containsKey(worldname)) {
      return AthionPlots.AthionMaps.get(worldname);
    } else {
      return null;
    }
  }
Пример #2
0
 public static World getFirstWorld() {
   if (AthionPlots.AthionMaps != null) {
     if (AthionPlots.AthionMaps.keySet() != null) {
       if (AthionPlots.AthionMaps.keySet().toArray().length > 0) {
         return Bukkit.getWorld((String) AthionPlots.AthionMaps.keySet().toArray()[0]);
       }
     }
   }
   return null;
 }
Пример #3
0
  public static AthionMaps getMap(final Block b) {
    if (b == null) {
      return null;
    } else {
      final String worldname = b.getWorld().getName().toLowerCase();

      if (AthionPlots.AthionMaps.containsKey(worldname)) {
        return AthionPlots.AthionMaps.get(worldname);
      } else {
        return null;
      }
    }
  }
Пример #4
0
 public static World getFirstWorld(final UUID uuid) {
   if (AthionPlots.AthionMaps != null) {
     if (AthionPlots.AthionMaps.keySet() != null) {
       if (AthionPlots.AthionMaps.keySet().toArray().length > 0) {
         for (final String mapkey : AthionPlots.AthionMaps.keySet()) {
           for (final String id : AthionPlots.AthionMaps.get(mapkey).plots.keySet()) {
             if (AthionPlots.AthionMaps.get(mapkey).plots.get(id).ownerId.equals(uuid)) {
               return Bukkit.getWorld(mapkey);
             }
           }
         }
       }
     }
   }
   return null;
 }
Пример #5
0
 public static boolean isPlotWorld(final BlockState b) {
   if (b == null) {
     return false;
   } else {
     return AthionPlots.AthionMaps.containsKey(b.getWorld().getName().toLowerCase());
   }
 }
Пример #6
0
 public static boolean isPlotWorld(final Player p) {
   if (p == null) {
     return false;
   } else {
     return AthionPlots.AthionMaps.containsKey(p.getWorld().getName().toLowerCase());
   }
 }
Пример #7
0
 public static boolean isPlotWorld(final World w) {
   if (w == null) {
     return false;
   } else {
     return AthionPlots.AthionMaps.containsKey(w.getName().toLowerCase());
   }
 }
Пример #8
0
 public static boolean isPlotWorld(final String name) {
   return AthionPlots.AthionMaps.containsKey(name.toLowerCase());
 }