From 2ab15b12a6a46c217c9ed5faede9f64c0ffe9cdb Mon Sep 17 00:00:00 2001 From: BuildTools Date: Tue, 14 Aug 2018 15:08:57 +0200 Subject: [PATCH] Added /ws sethome command Changes in settings.yml and messages.yml --- WorldSystem/bin/custom.yml | 1 + WorldSystem/bin/de.yml | 2 + WorldSystem/bin/en.yml | 2 + WorldSystem/bin/es.yml | 2 + WorldSystem/bin/hu.yml | 2 + WorldSystem/bin/nl.yml | 2 + WorldSystem/bin/pl.yml | 2 + WorldSystem/bin/plugin.yml | 8 ++- WorldSystem/bin/settings.yml | 2 + WorldSystem/src/custom.yml | 1 + WorldSystem/src/de.yml | 2 + .../src/de/butzlabben/world/WorldSystem.java | 3 ++ .../butzlabben/world/command/WSCommand.java | 5 ++ .../world/command/WSSethomeCommand.java | 43 ++++++++++++++++ .../world/config/MessageConfig.java | 5 ++ .../world/config/SettingsConfig.java | 10 +++- .../butzlabben/world/config/WorldConfig.java | 51 ++++++++++++++++--- .../butzlabben/world/wrapper/SystemWorld.java | 26 ++++------ WorldSystem/src/en.yml | 2 + WorldSystem/src/es.yml | 2 + WorldSystem/src/fi.yml | 2 + WorldSystem/src/fr.yml | 2 + WorldSystem/src/hu.yml | 2 + WorldSystem/src/nl.yml | 2 + WorldSystem/src/pl.yml | 2 + WorldSystem/src/plugin.yml | 8 ++- WorldSystem/src/ru.yml | 2 + WorldSystem/src/settings.yml | 2 + WorldSystem/src/zh.yml | 3 ++ 29 files changed, 172 insertions(+), 26 deletions(-) create mode 100644 WorldSystem/src/de/butzlabben/world/command/WSSethomeCommand.java diff --git a/WorldSystem/bin/custom.yml b/WorldSystem/bin/custom.yml index c535f3d..da7de8d 100644 --- a/WorldSystem/bin/custom.yml +++ b/WorldSystem/bin/custom.yml @@ -19,6 +19,7 @@ world: setting_up: "" playerlist: "%players" still_creating: "" + set_home: "" member: removed: "%player" diff --git a/WorldSystem/bin/de.yml b/WorldSystem/bin/de.yml index d2cf3ab..fa282b9 100644 --- a/WorldSystem/bin/de.yml +++ b/WorldSystem/bin/de.yml @@ -19,6 +19,7 @@ world: setting_up: "&aBereite Welt vor..." playerlist: "Spieler in der Welt: %players" still_creating: "&cWelt wird noch erstellt..." + set_home: "Du hast das Home gesetzt" member: removed: "Du hast &c%player&6 von deiner Welt entfernt!" @@ -67,6 +68,7 @@ command_help: list: - "/ws get &8- &7Gibt dir eine Welt" - "/ws home &8- &7Teleportiert dich auf deine Welt" + - "/ws sethome &8- &7Setzt ein bestimmtes Home" - "/ws gui &8- &7\u00f6ffnets das GUI-Menu wenn du der Weltenbesitzer bist" - "/ws tp &8- &7Teleportiert dich auf eine bestimmte Welt" - "/ws addmember &8- &7F\u00fcgt jemanden zu deiner Welt hinzu" diff --git a/WorldSystem/bin/en.yml b/WorldSystem/bin/en.yml index 308f3b0..2391716 100644 --- a/WorldSystem/bin/en.yml +++ b/WorldSystem/bin/en.yml @@ -19,6 +19,7 @@ world: setting_up: "&aLoading world..." playerlist: "Players in this world: %players" still_creating: "&cWorld is still creating" + set_home: "You set the home" member: removed: "You removed &c%player&6 from your world!" @@ -67,6 +68,7 @@ command_help: list: - "/ws get &8- &7Will give you a world" - "/ws home &8- &7Teleports you on your world" + - "/ws sethome &8- &7Sets a specific home" - "/ws gui &8- &7Opens the GUI menu if you are the world owner" - "/ws tp &8- &7Teleports you on a specific world" - "/ws addmember &8- &7Adds a player to your world" diff --git a/WorldSystem/bin/es.yml b/WorldSystem/bin/es.yml index e4e7d60..6074f1d 100644 --- a/WorldSystem/bin/es.yml +++ b/WorldSystem/bin/es.yml @@ -19,6 +19,7 @@ world: setting_up: "&aConfigurando el mundo..." playerlist: "Jugadores en este mundo: %players" still_creating: "&cWorld is still creating" + set_home: "You set the home" member: removed: "Has eliminado a &c%player&6 de tu mundo." @@ -67,6 +68,7 @@ command_help: list: - "/ws get &8- &7Obten tu mundo" - "/ws home &8- &7Ve a tu mundo" + - "/ws sethome &8- &7Sets a specific home" - "/ws gui &8- &7Abre el menu de tu mundo" - "/ws tp &8- &7Ve a un mundo especifico" - "/ws addmember &8- &7Agrega jugadores a tu mundo" diff --git a/WorldSystem/bin/hu.yml b/WorldSystem/bin/hu.yml index bd5b63d..8b5fcbe 100644 --- a/WorldSystem/bin/hu.yml +++ b/WorldSystem/bin/hu.yml @@ -19,6 +19,7 @@ world: setting_up: "&aA vilg megteremtse..." playerlist: "Jtkos ebben a vilgban: %player" still_creating: "&cWorld is still creating" + set_home: "You set the home" member: removed: "Trlted &c%player&6 jtkost a vilgodbl!" @@ -68,6 +69,7 @@ command_help: list: - "/ws get &8- &7Will give you a world" - "/ws home &8- &7Teleports you on your world" + - "/ws sethome &8- &7Sets a specific home" - "/ws gui &8- &7Opens the GUI menu if you are the worldowner" - "/ws tp &8- &7Teleports you on a specific world" - "/ws addmember &8- &7Adds a player to your world" diff --git a/WorldSystem/bin/nl.yml b/WorldSystem/bin/nl.yml index d9ea118..6c27605 100644 --- a/WorldSystem/bin/nl.yml +++ b/WorldSystem/bin/nl.yml @@ -19,6 +19,7 @@ world: setting_up: "&aWereld word aangemaakt" playerlist: "speler is in wereld: %players" still_creating: "&cWorld is still creating" + set_home: "You set the home" member: removed: "Jij hebt &c%player&6 verwijderd van jouw wereld!" @@ -67,6 +68,7 @@ command_help: list: - "/ws get &8- &7Will give you a world" - "/ws home &8- &7Teleports you on your world" + - "/ws sethome &8- &7Sets a specific home" - "/ws gui &8- &7Opens the GUI menu if you are the worldowner" - "/ws tp &8- &7Teleports you on a specific world" - "/ws addmember &8- &7Adds a player to your world" diff --git a/WorldSystem/bin/pl.yml b/WorldSystem/bin/pl.yml index 6929b2d..1efe5cf 100644 --- a/WorldSystem/bin/pl.yml +++ b/WorldSystem/bin/pl.yml @@ -19,6 +19,7 @@ world: setting_up: "&aUstawianie świata..." playerlist: "Gracze na tym świecie: %players" still_creating: "&cWorld is still creating" + set_home: "You set the home" member: removed: "Usunąłeś &c%player&6 ze swojego świata!" @@ -67,6 +68,7 @@ command_help: list: - "/ws get &8- &7Tworzy Twój świat" - "/ws home &8- &7Teleportuje Cie na Twój świat" + - "/ws sethome &8- &7Sets a specific home" - "/ws gui &8- &7Otwiera GUI świata jeżeli jesteś jego właścicielem" - "/ws tp &8- &7Teleportuje Cie na określony świat" - "/ws addmember &8- &7Dodaj gracza na swój świat" diff --git a/WorldSystem/bin/plugin.yml b/WorldSystem/bin/plugin.yml index 8fd86f4..cf46d4e 100644 --- a/WorldSystem/bin/plugin.yml +++ b/WorldSystem/bin/plugin.yml @@ -1,5 +1,5 @@ name: WorldSystem -version: 2.3.1 +version: 2.3.1.1 author: Butzlabben main: de.butzlabben.world.WorldSystem @@ -18,6 +18,9 @@ commands: usage: /ws help ws home: usage: /ws home + ws sethome: + usage: /ws sethome + permission: ws.sethome ws addmember: usage: /ws addmember ws delmember: @@ -66,6 +69,9 @@ permissions: ws.big: true ws.large: true ws.confirm: true + ws.sethome: + default: true + description: 'You can set a different worldspawn' ws.tp.*: default: op description: You can teleport everything diff --git a/WorldSystem/bin/settings.yml b/WorldSystem/bin/settings.yml index f1b1885..b03b781 100644 --- a/WorldSystem/bin/settings.yml +++ b/WorldSystem/bin/settings.yml @@ -14,6 +14,8 @@ worldborder: # Set a specialized center which is not the spawn center: as_spawn: true + # Should the worldborder move with the home set by the owner + as_home: false x: 0 y: 20 z: 0 diff --git a/WorldSystem/src/custom.yml b/WorldSystem/src/custom.yml index c535f3d..da7de8d 100644 --- a/WorldSystem/src/custom.yml +++ b/WorldSystem/src/custom.yml @@ -19,6 +19,7 @@ world: setting_up: "" playerlist: "%players" still_creating: "" + set_home: "" member: removed: "%player" diff --git a/WorldSystem/src/de.yml b/WorldSystem/src/de.yml index d2cf3ab..fa282b9 100644 --- a/WorldSystem/src/de.yml +++ b/WorldSystem/src/de.yml @@ -19,6 +19,7 @@ world: setting_up: "&aBereite Welt vor..." playerlist: "Spieler in der Welt: %players" still_creating: "&cWelt wird noch erstellt..." + set_home: "Du hast das Home gesetzt" member: removed: "Du hast &c%player&6 von deiner Welt entfernt!" @@ -67,6 +68,7 @@ command_help: list: - "/ws get &8- &7Gibt dir eine Welt" - "/ws home &8- &7Teleportiert dich auf deine Welt" + - "/ws sethome &8- &7Setzt ein bestimmtes Home" - "/ws gui &8- &7\u00f6ffnets das GUI-Menu wenn du der Weltenbesitzer bist" - "/ws tp &8- &7Teleportiert dich auf eine bestimmte Welt" - "/ws addmember &8- &7F\u00fcgt jemanden zu deiner Welt hinzu" diff --git a/WorldSystem/src/de/butzlabben/world/WorldSystem.java b/WorldSystem/src/de/butzlabben/world/WorldSystem.java index 3933268..51b36cf 100644 --- a/WorldSystem/src/de/butzlabben/world/WorldSystem.java +++ b/WorldSystem/src/de/butzlabben/world/WorldSystem.java @@ -24,6 +24,7 @@ import de.butzlabben.world.command.WSHomeCommand; import de.butzlabben.world.command.WSInfoCommand; import de.butzlabben.world.command.WSLeaveCommand; import de.butzlabben.world.command.WSResetCommand; +import de.butzlabben.world.command.WSSethomeCommand; import de.butzlabben.world.command.WSTPCommand; import de.butzlabben.world.command.WSTnTCommand; import de.butzlabben.world.command.WSToggleBuildCommand; @@ -106,6 +107,8 @@ public class WorldSystem extends JavaPlugin { getCommand("ws addmember").setExecutor(new WSAddmemberCommand()); getCommand("ws delmember").setExecutor(new WSDelmemberCommand()); getCommand("ws home").setExecutor(new WSHomeCommand()); + // Here we go for #20 and #22 + getCommand("ws sethome").setExecutor(new WSSethomeCommand()); getCommand("ws leave").setExecutor(new WSLeaveCommand()); getCommand("ws fire").setExecutor(new WSFireCommand()); getCommand("ws info").setExecutor(new WSInfoCommand()); diff --git a/WorldSystem/src/de/butzlabben/world/command/WSCommand.java b/WorldSystem/src/de/butzlabben/world/command/WSCommand.java index ce25926..d60edff 100644 --- a/WorldSystem/src/de/butzlabben/world/command/WSCommand.java +++ b/WorldSystem/src/de/butzlabben/world/command/WSCommand.java @@ -31,6 +31,7 @@ public class WSCommand implements CommandExecutor, TabCompleter { list.add("info"); list.add("leave"); list.add("reset"); + list.add("sethome"); list.add("tnt"); list.add("togglegm"); list.add("toggletp"); @@ -82,6 +83,10 @@ public class WSCommand implements CommandExecutor, TabCompleter { if (!(cs instanceof Player)) return true; WorldSystem.getInstance().getCommand("ws home").execute(cs, label, args); + } else if (subcommand.equals("sethome")) { + if (!(cs instanceof Player)) + return true; + WorldSystem.getInstance().getCommand("ws sethome").execute(cs, label, args); } else if (subcommand.equals("leave")) { WorldSystem.getInstance().getCommand("ws leave").execute(cs, label, args); } else if (subcommand.equals("info")) { diff --git a/WorldSystem/src/de/butzlabben/world/command/WSSethomeCommand.java b/WorldSystem/src/de/butzlabben/world/command/WSSethomeCommand.java new file mode 100644 index 0000000..8104c3c --- /dev/null +++ b/WorldSystem/src/de/butzlabben/world/command/WSSethomeCommand.java @@ -0,0 +1,43 @@ +package de.butzlabben.world.command; + +import java.io.IOException; + +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; + +import de.butzlabben.world.config.MessageConfig; +import de.butzlabben.world.config.WorldConfig; +import de.butzlabben.world.wrapper.WorldPlayer; + +/** + * @author Butzlabben + * @since 14.08.2018 + */ +public class WSSethomeCommand implements CommandExecutor { + + @Override + public boolean onCommand(CommandSender cs, Command cmd, String arg2, String[] args) { + Player p = (Player) cs; + WorldPlayer wp = new WorldPlayer(p); + if (!wp.isOnSystemWorld()) { + p.sendMessage(MessageConfig.getNotOnWorld()); + return true; + } + if (!wp.isOwnerofWorld()) { + p.sendMessage(MessageConfig.getNoPermission()); + return true; + } + WorldConfig config = WorldConfig.getWorldConfig(p.getWorld().getName()); + config.setHome(p.getLocation()); + try { + config.save(); + p.sendMessage(MessageConfig.getHomeSet()); + } catch (IOException e) { + p.sendMessage(MessageConfig.getUnknownError() + ": " + e.getMessage()); + e.printStackTrace(); + } + return true; + } +} diff --git a/WorldSystem/src/de/butzlabben/world/config/MessageConfig.java b/WorldSystem/src/de/butzlabben/world/config/MessageConfig.java index 7f3d61e..3f5778c 100644 --- a/WorldSystem/src/de/butzlabben/world/config/MessageConfig.java +++ b/WorldSystem/src/de/butzlabben/world/config/MessageConfig.java @@ -27,6 +27,7 @@ public class MessageConfig { { defaultCmdHelp.add("/ws get 8- 7Will give you a World"); defaultCmdHelp.add("/ws home 8- 7Teleports you on your World"); + defaultCmdHelp.add("/ws sethome 8- 7Sets a specific home"); defaultCmdHelp.add("/ws tp 8- 7Teleports you on a specific World"); defaultCmdHelp.add("/ws addmember 8- 7Adds a player to your World"); defaultCmdHelp.add("/ws delmember8 - 7Removes a player from your World"); @@ -271,4 +272,8 @@ public class MessageConfig { list = list.stream().map(s -> ChatColor.translateAlternateColorCodes('&', s)).collect(Collectors.toList()); return list; } + + public static String getHomeSet() { + return getMessage("world.set_home", "You set the home"); + } } diff --git a/WorldSystem/src/de/butzlabben/world/config/SettingsConfig.java b/WorldSystem/src/de/butzlabben/world/config/SettingsConfig.java index 70d6c1e..bffa0cd 100644 --- a/WorldSystem/src/de/butzlabben/world/config/SettingsConfig.java +++ b/WorldSystem/src/de/butzlabben/world/config/SettingsConfig.java @@ -31,7 +31,7 @@ public class SettingsConfig { YamlConfiguration cfg = getConfig(); SystemWorld sw = SystemWorld.getSystemWorld(w.getName()); - + boolean shouldChange = cfg.getBoolean("worldborder.should_change", false); if (shouldChange) { long size = cfg.getLong("worldborder.normal", 1000); @@ -61,6 +61,11 @@ public class SettingsConfig { cfg.getDouble("worldborder.center.y", 20), cfg.getDouble("worldborder.center.z", 0)); w.getWorldBorder().setCenter(loc); } + if (cfg.getBoolean("worldborder.center.as_home")) { + WorldConfig config = WorldConfig.getWorldConfig(w.getName()); + if (config.getHome() != null) + w.getWorldBorder().setCenter(config.getHome()); + } } if (w.isGameRule("announceAdvancements")) @@ -138,7 +143,8 @@ public class SettingsConfig { private static YamlConfiguration getConfig() { try { - return YamlConfiguration.loadConfiguration(new InputStreamReader(new FileInputStream(file), Charset.forName("UTF-8"))); + return YamlConfiguration + .loadConfiguration(new InputStreamReader(new FileInputStream(file), Charset.forName("UTF-8"))); } catch (FileNotFoundException e) { e.printStackTrace(); } diff --git a/WorldSystem/src/de/butzlabben/world/config/WorldConfig.java b/WorldSystem/src/de/butzlabben/world/config/WorldConfig.java index cc13580..4e8aff4 100644 --- a/WorldSystem/src/de/butzlabben/world/config/WorldConfig.java +++ b/WorldSystem/src/de/butzlabben/world/config/WorldConfig.java @@ -9,6 +9,7 @@ import java.util.List; import java.util.UUID; import org.bukkit.Bukkit; +import org.bukkit.Location; import org.bukkit.OfflinePlayer; import org.bukkit.configuration.ConfigurationSection; import org.bukkit.configuration.file.YamlConfiguration; @@ -20,9 +21,9 @@ import com.mojang.authlib.GameProfile; import de.butzlabben.world.GameProfileBuilder; /** - * This class represents a worldconfig.yml file - * Here you can edit and read all things - * Get an instance via WorldConfig.getWorldConfig() + * This class represents a worldconfig.yml file Here you can edit and read all + * things Get an instance via WorldConfig.getWorldConfig() + * * @since 01.05.2018 */ public class WorldConfig { @@ -37,11 +38,12 @@ public class WorldConfig { } return worldconfig; } - + /** * Returns wether a worldconfig exists for this worldname * - * @param worldname name of the world + * @param worldname + * name of the world * @return Wether this world has a worldconfig */ public static boolean exists(String worldname) { @@ -72,6 +74,8 @@ public class WorldConfig { private String ownerName; private boolean fire, tnt; + private Location home = null; + private WorldConfig(String worldname) { if (exists(worldname) == false) throw new IllegalArgumentException("WorldConfig doesn't exist"); @@ -428,6 +432,14 @@ public class WorldConfig { cfg.set("Settings.TNTDamage", tnt); cfg.set("Settings.Fire", fire); + if (home != null) { + cfg.set("Settings.home.x", home.getX()); + cfg.set("Settings.home.y", home.getY()); + cfg.set("Settings.home.z", home.getZ()); + cfg.set("Settings.home.yaw", home.getYaw()); + cfg.set("Settings.home.pitch", home.getPitch()); + } + cfg.set("Members", null); for (java.util.Map.Entry> entry : permissions.entrySet()) { @@ -455,6 +467,12 @@ public class WorldConfig { tnt = cfg.getBoolean("Settings.TNTDamage", true); fire = cfg.getBoolean("Settings.Fire", true); + if (cfg.isSet("Settings.home")) { + home = new Location(null, cfg.getDouble("Settings.home.x"), cfg.getDouble("Settings.home.y"), + cfg.getDouble("Settings.home.z"), (float) cfg.getDouble("Settings.home.yaw"), + (float) cfg.getDouble("Settings.home.pitch")); + } + if (membersOldFormatted(cfg)) { for (String s : cfg.getConfigurationSection("Members").getKeys(false)) { HashSet perms = new HashSet<>(); @@ -497,6 +515,23 @@ public class WorldConfig { return name != null; } + /** + * @param loc the new home of the world + */ + public void setHome(Location loc) { + home = loc; + } + + /** + * @return the home of the world. If not set returns null + */ + public Location getHome() { + if (home == null) + return null; + return new Location(Bukkit.getWorld(getWorldName()), home.getX(), home.getY(), home.getZ(), home.getYaw(), + home.getPitch()); + } + public String getOwnerName() { return ownerName; } @@ -516,7 +551,8 @@ public class WorldConfig { /** * Allow or Disallow Fire Damage on this world * - * @param player the player which toggles fire + * @param player + * the player which toggles fire * @param fire * if fire is enabled * @return if the player has the permissions to change the value @@ -539,7 +575,8 @@ public class WorldConfig { /** * Allow or Disallow TNT Damage on this world * - * @param player which toggles tnt + * @param player + * which toggles tnt * @param tnt * if tnt is enabled * @return if the player has the permissions to change the value diff --git a/WorldSystem/src/de/butzlabben/world/wrapper/SystemWorld.java b/WorldSystem/src/de/butzlabben/world/wrapper/SystemWorld.java index add074d..a1e159e 100644 --- a/WorldSystem/src/de/butzlabben/world/wrapper/SystemWorld.java +++ b/WorldSystem/src/de/butzlabben/world/wrapper/SystemWorld.java @@ -35,7 +35,7 @@ public class SystemWorld { private String worldname; private boolean unloading = false; private boolean creating = false; - + private static HashMap cached = new HashMap<>(); /** @@ -96,7 +96,6 @@ public class SystemWorld { }); return; } - Preconditions.checkNotNull(w, "world must not be null"); unloading = true; w.save(); @@ -252,16 +251,8 @@ public class SystemWorld { w = Bukkit.createWorld(creator); this.w = w; - if (PluginConfig.isSurvival()) { - p.setGameMode(GameMode.SURVIVAL); - } else { - p.setGameMode(GameMode.CREATIVE); - } - if (PluginConfig.useWorldSpawn()) { - p.teleport(PluginConfig.getWorldSpawn(w)); - } else { - p.teleport(w.getSpawnLocation()); - } + + teleportToWorldSpawn(p); OfflinePlayer owner = Bukkit.getOfflinePlayer(WorldConfig.getWorldConfig(worldname).getOwner()); DependenceConfig dc = new DependenceConfig(owner); @@ -392,10 +383,15 @@ public class SystemWorld { if (w == null) return; - if (PluginConfig.useWorldSpawn()) { - p.teleport(PluginConfig.getWorldSpawn(w)); + WorldConfig config = WorldConfig.getWorldConfig(worldname); + if (config.getHome() != null) { + p.teleport(config.getHome()); } else { - p.teleport(w.getSpawnLocation()); + if (PluginConfig.useWorldSpawn()) { + p.teleport(PluginConfig.getWorldSpawn(w)); + } else { + p.teleport(w.getSpawnLocation()); + } } if (PluginConfig.isSurvival()) { p.setGameMode(GameMode.SURVIVAL); diff --git a/WorldSystem/src/en.yml b/WorldSystem/src/en.yml index 308f3b0..2391716 100644 --- a/WorldSystem/src/en.yml +++ b/WorldSystem/src/en.yml @@ -19,6 +19,7 @@ world: setting_up: "&aLoading world..." playerlist: "Players in this world: %players" still_creating: "&cWorld is still creating" + set_home: "You set the home" member: removed: "You removed &c%player&6 from your world!" @@ -67,6 +68,7 @@ command_help: list: - "/ws get &8- &7Will give you a world" - "/ws home &8- &7Teleports you on your world" + - "/ws sethome &8- &7Sets a specific home" - "/ws gui &8- &7Opens the GUI menu if you are the world owner" - "/ws tp &8- &7Teleports you on a specific world" - "/ws addmember &8- &7Adds a player to your world" diff --git a/WorldSystem/src/es.yml b/WorldSystem/src/es.yml index e4e7d60..6074f1d 100644 --- a/WorldSystem/src/es.yml +++ b/WorldSystem/src/es.yml @@ -19,6 +19,7 @@ world: setting_up: "&aConfigurando el mundo..." playerlist: "Jugadores en este mundo: %players" still_creating: "&cWorld is still creating" + set_home: "You set the home" member: removed: "Has eliminado a &c%player&6 de tu mundo." @@ -67,6 +68,7 @@ command_help: list: - "/ws get &8- &7Obten tu mundo" - "/ws home &8- &7Ve a tu mundo" + - "/ws sethome &8- &7Sets a specific home" - "/ws gui &8- &7Abre el menu de tu mundo" - "/ws tp &8- &7Ve a un mundo especifico" - "/ws addmember &8- &7Agrega jugadores a tu mundo" diff --git a/WorldSystem/src/fi.yml b/WorldSystem/src/fi.yml index b2da226..86ba97c 100644 --- a/WorldSystem/src/fi.yml +++ b/WorldSystem/src/fi.yml @@ -19,6 +19,7 @@ world: setting_up: "&aAlustetaan maailmaa..." playerlist: "Pelaajat tässä maailmassa: %players" still_creating: "&cWorld is still creating" + set_home: "You set the home" member: removed: "Poistit pelaajan &c%player&6 maailmastasi!" @@ -67,6 +68,7 @@ command_help: list: - "/ws get &8- &7Luo sinulle maailman" - "/ws home &8- &7Teleporttaa sinut maailmaasi" + - "/ws sethome &8- &7Sets a specific home" - "/ws gui &8- &7Avaa sinulle valikon jos omistat tämän maailman" - "/ws tp &8- &7Teleporttaa sinut tiettyyn maailmaan" - "/ws addmember &8- &7Lisää pelaajan sinun maailmaasi" diff --git a/WorldSystem/src/fr.yml b/WorldSystem/src/fr.yml index 388efb5..ce9c020 100644 --- a/WorldSystem/src/fr.yml +++ b/WorldSystem/src/fr.yml @@ -19,6 +19,7 @@ world: setting_up: "&aChargement du monde ..." playerlist: "Joueurs dans ce monde: %players" still_creating: "&cWorld is still creating" + set_home: "You set the home" member: removed: "Vous avez supprimé &c%player&6 de votre monde!" @@ -67,6 +68,7 @@ command_help: list: - "/ws get &8- &7Je vais vous donner un monde" - "/ws home &8- &7Vous téléporte sur votre monde" + - "/ws sethome &8- &7Sets a specific home" - "/ws gui &8- &7Ouvre le menu de l'interface graphique si vous êtes le propriétaire mondial" - "/ws tp &8- &7Vous téléporte sur un monde spécifique" - "/ws addmember &8- &7Ajoute un joueur à ton monde" diff --git a/WorldSystem/src/hu.yml b/WorldSystem/src/hu.yml index bd5b63d..8b5fcbe 100644 --- a/WorldSystem/src/hu.yml +++ b/WorldSystem/src/hu.yml @@ -19,6 +19,7 @@ world: setting_up: "&aA vilg megteremtse..." playerlist: "Jtkos ebben a vilgban: %player" still_creating: "&cWorld is still creating" + set_home: "You set the home" member: removed: "Trlted &c%player&6 jtkost a vilgodbl!" @@ -68,6 +69,7 @@ command_help: list: - "/ws get &8- &7Will give you a world" - "/ws home &8- &7Teleports you on your world" + - "/ws sethome &8- &7Sets a specific home" - "/ws gui &8- &7Opens the GUI menu if you are the worldowner" - "/ws tp &8- &7Teleports you on a specific world" - "/ws addmember &8- &7Adds a player to your world" diff --git a/WorldSystem/src/nl.yml b/WorldSystem/src/nl.yml index d9ea118..6c27605 100644 --- a/WorldSystem/src/nl.yml +++ b/WorldSystem/src/nl.yml @@ -19,6 +19,7 @@ world: setting_up: "&aWereld word aangemaakt" playerlist: "speler is in wereld: %players" still_creating: "&cWorld is still creating" + set_home: "You set the home" member: removed: "Jij hebt &c%player&6 verwijderd van jouw wereld!" @@ -67,6 +68,7 @@ command_help: list: - "/ws get &8- &7Will give you a world" - "/ws home &8- &7Teleports you on your world" + - "/ws sethome &8- &7Sets a specific home" - "/ws gui &8- &7Opens the GUI menu if you are the worldowner" - "/ws tp &8- &7Teleports you on a specific world" - "/ws addmember &8- &7Adds a player to your world" diff --git a/WorldSystem/src/pl.yml b/WorldSystem/src/pl.yml index 6929b2d..1efe5cf 100644 --- a/WorldSystem/src/pl.yml +++ b/WorldSystem/src/pl.yml @@ -19,6 +19,7 @@ world: setting_up: "&aUstawianie świata..." playerlist: "Gracze na tym świecie: %players" still_creating: "&cWorld is still creating" + set_home: "You set the home" member: removed: "Usunąłeś &c%player&6 ze swojego świata!" @@ -67,6 +68,7 @@ command_help: list: - "/ws get &8- &7Tworzy Twój świat" - "/ws home &8- &7Teleportuje Cie na Twój świat" + - "/ws sethome &8- &7Sets a specific home" - "/ws gui &8- &7Otwiera GUI świata jeżeli jesteś jego właścicielem" - "/ws tp &8- &7Teleportuje Cie na określony świat" - "/ws addmember &8- &7Dodaj gracza na swój świat" diff --git a/WorldSystem/src/plugin.yml b/WorldSystem/src/plugin.yml index 8fd86f4..cf46d4e 100644 --- a/WorldSystem/src/plugin.yml +++ b/WorldSystem/src/plugin.yml @@ -1,5 +1,5 @@ name: WorldSystem -version: 2.3.1 +version: 2.3.1.1 author: Butzlabben main: de.butzlabben.world.WorldSystem @@ -18,6 +18,9 @@ commands: usage: /ws help ws home: usage: /ws home + ws sethome: + usage: /ws sethome + permission: ws.sethome ws addmember: usage: /ws addmember ws delmember: @@ -66,6 +69,9 @@ permissions: ws.big: true ws.large: true ws.confirm: true + ws.sethome: + default: true + description: 'You can set a different worldspawn' ws.tp.*: default: op description: You can teleport everything diff --git a/WorldSystem/src/ru.yml b/WorldSystem/src/ru.yml index 73616bd..d4b980f 100644 --- a/WorldSystem/src/ru.yml +++ b/WorldSystem/src/ru.yml @@ -19,6 +19,7 @@ world: setting_up: "&aПриготовлеваю мир..." playerlist: "Игроков в мире: %players" still_creating: "&cWorld is still creating" + set_home: "You set the home" member: removed: "Ты удалил &c%player&6 из твоего мира!" @@ -67,6 +68,7 @@ command_help: list: - "/ws get &8- &7Даст тебе мир" - "/ws home &8- &7Телепортирует тебя в твой мир" + - "/ws sethome &8- &7Sets a specific home" - "/ws gui &8- &7Открывает ГИП если ты владелец этого мира" - "/ws tp &8- &7Телепортирует тебя в определенный мир" - "/ws addmember &8- &7Добавляет кого-то к твоему миру" diff --git a/WorldSystem/src/settings.yml b/WorldSystem/src/settings.yml index f1b1885..b03b781 100644 --- a/WorldSystem/src/settings.yml +++ b/WorldSystem/src/settings.yml @@ -14,6 +14,8 @@ worldborder: # Set a specialized center which is not the spawn center: as_spawn: true + # Should the worldborder move with the home set by the owner + as_home: false x: 0 y: 20 z: 0 diff --git a/WorldSystem/src/zh.yml b/WorldSystem/src/zh.yml index 12bd753..121f6e2 100644 --- a/WorldSystem/src/zh.yml +++ b/WorldSystem/src/zh.yml @@ -18,6 +18,8 @@ world: other: "&c这个玩家没有世界!" setting_up: "&a正在建立世界..." playerlist: "玩家: %players 在这个世界上" + still_creating: "&cWorld is still creating" + set_home: "You set the home" member: removed: "玩家 &c%player&6 从你的世界移除!" @@ -65,6 +67,7 @@ command_help: list: - "/ws get &8- &7创建一个世界" - "/ws home &8- &7返回你的世界" + - "/ws sethome &8- &7Sets a specific home" - "/ws gui &8- &7如果你是世界管理者,使用该指令打开菜单" - "/ws tp &8- &7传送到指定世界" - "/ws addmember &8- &7添加一个玩家到你的世界"