Пример #1
0
 public static void setLocation(String type, Location loc) {
   Files.getDataFile().set(type + ".world", loc.getWorld().getName());
   Files.getDataFile().set(type + ".x", loc.getBlockX());
   Files.getDataFile().set(type + ".y", loc.getBlockY());
   Files.getDataFile().set(type + ".z", loc.getBlockZ());
   Files.saveDataFile();
 }
Пример #2
0
 public static Location getLocation(String type) {
   Location loc =
       new Location(
           Bukkit.getWorld(Files.getDataFile().getString(type + ".world")),
           Files.getDataFile().getInt(type + ".x"),
           Files.getDataFile().getInt(type + ".y"),
           Files.getDataFile().getInt(type + ".z"));
   return loc;
 }