Change formatting system to use MineDown (https://github.com/Phoenix616/MineDown)

Rename huskHomes1Migrator.java class to legacyVersionMigrator.java
Increment version number to 2.1.0
This commit is contained in:
[email protected] authored and William278 committed 2021-01-10 12:00:36 +00:00
1 parent 8559bd6161
commit 96cc08d71b
9 files changed
+284 -223

No files matched your search

+11 -1
View File
@@ -6,7 +6,7 @@
<groupId>me.William278</groupId>
<artifactId>HuskHomes</artifactId>
<version>2.0.2</version>
<version>2.1.0</version>
<packaging>jar</packaging>
<name>HuskHomes</name>
@@ -71,6 +71,10 @@
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
<repository>
<id>minebench-repo</id>
<url>https://repo.minebench.de/</url>
</repository>
</repositories>
<dependencies>
@@ -91,5 +95,11 @@
<version>1.7</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>de.themoep</groupId>
<artifactId>minedown</artifactId>
<version>1.6.2-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
@@ -7,7 +7,7 @@ import me.william278.huskhomes2.Events.onPlayerDeath;
import me.william278.huskhomes2.Events.onPlayerJoin;
import me.william278.huskhomes2.Integrations.dynamicMap;
import me.william278.huskhomes2.Integrations.economy;
import me.william278.huskhomes2.Migrators.huskHomes1Migrator;
import me.william278.huskhomes2.Migrators.legacyVersionMigrator;
import me.william278.huskhomes2.Objects.Settings;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;
@@ -120,14 +120,14 @@ public final class HuskHomes extends JavaPlugin {
getLogger().info(versionChecker.getVersionCheckString());
// MIGRATION: Check if a migration needs to occur
huskHomes1Migrator.checkStartupMigration();
legacyVersionMigrator.checkStartupMigration();
// Load the config
configManager.loadConfig();
// MIGRATION: Migrate config files
if (huskHomes1Migrator.startupMigrate) {
new huskHomes1Migrator().migrateConfig();
if (legacyVersionMigrator.startupMigrate) {
new legacyVersionMigrator().migrateConfig();
}
// Load the messages (in the right language)
@@ -140,9 +140,9 @@ public final class HuskHomes extends JavaPlugin {
dataManager.setupStorage();
// MIGRATION: Migrate SQL data
if (huskHomes1Migrator.startupMigrate) {
new huskHomes1Migrator().migratePlayerData();
new huskHomes1Migrator().migrateHomeData();
if (legacyVersionMigrator.startupMigrate) {
new legacyVersionMigrator().migratePlayerData();
new legacyVersionMigrator().migrateHomeData();
}
// Setup the Dynmap integration if it is enabled
@@ -15,7 +15,7 @@ import java.util.UUID;
import static org.bukkit.configuration.file.YamlConfiguration.loadConfiguration;
// This class migrates data from HuskHomes 1.5.x to HuskHomes 2.x
public class huskHomes1Migrator {
public class legacyVersionMigrator {
public static boolean startupMigrate;
private static String sourcePlayerTable;
@@ -24,11 +24,11 @@ public class editingHandler {
private static ComponentBuilder editWarpOptions(Warp warp) {
ComponentBuilder options = new ComponentBuilder();
options.append(optionButton("[Teleport] ", net.md_5.bungee.api.ChatColor.GREEN, ClickEvent.Action.RUN_COMMAND, "/warp " + warp.getName(), "Teleport to this warp"));
options.append(optionButton("[Delete] ", net.md_5.bungee.api.ChatColor.RED, ClickEvent.Action.RUN_COMMAND, "/delwarp " + warp.getName(), "Delete this warp"));
options.append(optionButton("[Relocate]\n", net.md_5.bungee.api.ChatColor.BLUE, ClickEvent.Action.RUN_COMMAND, "/editwarp " + warp.getName() + " location", "Update this warp's location"));
options.append(optionButton("[Rename] ", net.md_5.bungee.api.ChatColor.YELLOW, ClickEvent.Action.SUGGEST_COMMAND, "/editwarp " + warp.getName() + " rename ", "Change the name of this warp"));
options.append(optionButton("[Edit Description] ", net.md_5.bungee.api.ChatColor.GOLD, ClickEvent.Action.SUGGEST_COMMAND, "/editwarp " + warp.getName() + " description ", "Update this warp's description"));
options.append(optionButton(messageManager.getRawMessage("edit_warp_teleport_button") + " ", net.md_5.bungee.api.ChatColor.GREEN, ClickEvent.Action.RUN_COMMAND, "/warp " + warp.getName(), messageManager.getRawMessage("edit_warp_teleport_button_tooltip")));
options.append(optionButton(messageManager.getRawMessage("edit_warp_delete_button") + " ", net.md_5.bungee.api.ChatColor.RED, ClickEvent.Action.RUN_COMMAND, "/delwarp " + warp.getName(), messageManager.getRawMessage("edit_warp_delete_button_tooltip")));
options.append(optionButton(messageManager.getRawMessage("edit_warp_relocate_button") + "\n", net.md_5.bungee.api.ChatColor.BLUE, ClickEvent.Action.RUN_COMMAND, "/editwarp " + warp.getName() + " location", messageManager.getRawMessage("edit_warp_relocate_button_tooltip")));
options.append(optionButton(messageManager.getRawMessage("edit_warp_rename_button") + " ", net.md_5.bungee.api.ChatColor.YELLOW, ClickEvent.Action.SUGGEST_COMMAND, "/editwarp " + warp.getName() + " rename ", messageManager.getRawMessage("edit_warp_rename_button_tooltip")));
options.append(optionButton(messageManager.getRawMessage("edit_warp_description_button") + " ", net.md_5.bungee.api.ChatColor.GOLD, ClickEvent.Action.SUGGEST_COMMAND, "/editwarp " + warp.getName() + " description ", messageManager.getRawMessage("edit_warp_description_button_tooltip")));
return options;
}
@@ -36,17 +36,17 @@ public class editingHandler {
private static ComponentBuilder editHomeOptions(Player p, Home home) {
ComponentBuilder options = new ComponentBuilder();
options.append(optionButton("[Teleport] ", net.md_5.bungee.api.ChatColor.GREEN, ClickEvent.Action.RUN_COMMAND, "/home " + home.getName(), "Teleport to your home"));
options.append(optionButton("[Delete] ", net.md_5.bungee.api.ChatColor.RED, ClickEvent.Action.RUN_COMMAND, "/delhome " + home.getName(), "Delete your home"));
options.append(optionButton("[Relocate]\n", net.md_5.bungee.api.ChatColor.BLUE, ClickEvent.Action.RUN_COMMAND, "/edithome " + home.getName() + " location", "Update your home's location"));
options.append(optionButton("[Rename] ", net.md_5.bungee.api.ChatColor.YELLOW, ClickEvent.Action.SUGGEST_COMMAND, "/edithome " + home.getName() + " rename ", "Change the name of your home"));
options.append(optionButton("[Edit Description] ", net.md_5.bungee.api.ChatColor.GOLD, ClickEvent.Action.SUGGEST_COMMAND, "/edithome " + home.getName() + " description ", "Update the description of your home"));
options.append(optionButton(messageManager.getRawMessage("edit_home_teleport_button") + " ", net.md_5.bungee.api.ChatColor.GREEN, ClickEvent.Action.RUN_COMMAND, "/home " + home.getName(), messageManager.getRawMessage("edit_home_teleport_button_tooltip")));
options.append(optionButton(messageManager.getRawMessage("edit_home_delete_button") + " ", net.md_5.bungee.api.ChatColor.RED, ClickEvent.Action.RUN_COMMAND, "/delhome " + home.getName(), messageManager.getRawMessage("edit_home_delete_button_tooltip")));
options.append(optionButton(messageManager.getRawMessage("edit_home_relocate_button") + "\n", net.md_5.bungee.api.ChatColor.BLUE, ClickEvent.Action.RUN_COMMAND, "/edithome " + home.getName() + " location", messageManager.getRawMessage("edit_home_relocate_button_tooltip")));
options.append(optionButton(messageManager.getRawMessage("edit_home_rename_button") + " ", net.md_5.bungee.api.ChatColor.YELLOW, ClickEvent.Action.SUGGEST_COMMAND, "/edithome " + home.getName() + " rename ", messageManager.getRawMessage("edit_home_rename_button_tooltip")));
options.append(optionButton(messageManager.getRawMessage("edit_home_description_button") + " ", net.md_5.bungee.api.ChatColor.GOLD, ClickEvent.Action.SUGGEST_COMMAND, "/edithome " + home.getName() + " description ", messageManager.getRawMessage("edit_home_description_button_tooltip")));
if (p.hasPermission("huskhomes.edithome.public")) {
if (!home.isPublic()) {
options.append(optionButton("[Make Public] ", net.md_5.bungee.api.ChatColor.DARK_GREEN, ClickEvent.Action.RUN_COMMAND, "/edithome " + home.getName() + " public", "Open your home to the public"));
options.append(optionButton(messageManager.getRawMessage("edit_home_make_public_button") + " ", net.md_5.bungee.api.ChatColor.DARK_GREEN, ClickEvent.Action.RUN_COMMAND, "/edithome " + home.getName() + " public", messageManager.getRawMessage("edit_home_make_public_button_tooltip")));
} else {
options.append(optionButton("[Make Private] ", net.md_5.bungee.api.ChatColor.DARK_RED, ClickEvent.Action.RUN_COMMAND, "/edithome " + home.getName() + " private", "Make your home private"));
options.append(optionButton(messageManager.getRawMessage("edit_home_make_private_button") + " ", net.md_5.bungee.api.ChatColor.DARK_RED, ClickEvent.Action.RUN_COMMAND, "/edithome " + home.getName() + " private", messageManager.getRawMessage("edit_home_make_private_button_tooltip")));
}
}
return options;
@@ -55,9 +55,9 @@ public class listHandler {
private static void displayPageButtons(Player p, int pageNumber, int homeListSize, int homeUpperBound, String command) {
ComponentBuilder pageButtons = new ComponentBuilder();
TextComponent nextPageButton = pageButton("[Next Page >]", net.md_5.bungee.api.ChatColor.GREEN, command + " " + (pageNumber + 1), "Click to view next 10");
TextComponent previousPageButton = pageButton("[< Last Page]", net.md_5.bungee.api.ChatColor.RED, command + " " + (pageNumber - 1), "Click to view previous 10");
TextComponent divider = new TextComponent(" • ");
TextComponent nextPageButton = pageButton(messageManager.getRawMessage("list_button_next_page"), net.md_5.bungee.api.ChatColor.GREEN, command + " " + (pageNumber + 1), messageManager.getRawMessage("list_button_next_page_tooltip"));
TextComponent previousPageButton = pageButton(messageManager.getRawMessage("list_button_previous_page"), net.md_5.bungee.api.ChatColor.RED, command + " " + (pageNumber - 1), messageManager.getRawMessage("list_button_previous_page_tooltip"));
TextComponent divider = new TextComponent(messageManager.getRawMessage("list_item_divider"));
divider.setColor(net.md_5.bungee.api.ChatColor.GRAY);
if (pageNumber != 1) {
@@ -1,7 +1,8 @@
package me.william278.huskhomes2;
import de.themoep.minedown.MineDown;
import net.md_5.bungee.api.ChatMessageType;
import net.md_5.bungee.api.chat.TextComponent;
import net.md_5.bungee.api.chat.BaseComponent;
import org.apache.commons.lang.StringEscapeUtils;
import org.bukkit.Bukkit;
import org.bukkit.configuration.file.FileConfiguration;
@@ -14,17 +15,14 @@ import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import java.util.HashMap;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import static net.md_5.bungee.api.ChatColor.COLOR_CHAR;
import static org.bukkit.configuration.file.YamlConfiguration.loadConfiguration;
public class messageManager {
private static final int languageFileVersion = 1;
private static HashMap<String, String> messages = new HashMap<>();
private static final HashMap<String, String> messages = new HashMap<>();
private static final HuskHomes plugin = HuskHomes.getInstance();
@@ -75,11 +73,9 @@ public class messageManager {
"| Developed by William278 |\n" +
" ------------------------------ \n" +
"If you'd like to use a different language, you can change it in the config.yml \n" +
"Change the appearance/text of messages in the plugin using this config: \n" +
"1. Use the selection symbol (§) followed by a Minecraft color code to add color to the messages.\n" +
"2. Use an ampersand symbol and hashtag (&#) followed by a 6 digit hex code to add custom colors.\n" +
"3. Example 1: \"§cHello!\" will display \"Hello!\" in light red.\n" +
"4. Example 2: \"&#32CD32Hello\" will display \"Hello!\" in a bright green color (hex: #32CD32)");
"Change the appearance/text of messages in the plugin using this config. \n" +
"This config makes use of MineDown formatting, with extensive support for custom colors & formats. \n" +
"For formatting help, see: https://github.com/Phoenix616/MineDown or check the HuskHomes Wiki.");
InputStream defaultMessageFile = plugin.getResource("Languages/" + language + ".yml");
if (defaultMessageFile != null) {
YamlConfiguration yamlConfiguration = YamlConfiguration.loadConfiguration(new InputStreamReader(defaultMessageFile, StandardCharsets.UTF_8));
@@ -93,23 +89,6 @@ public class messageManager {
}
}
// Translate hexadecimal custom color codes
private static String translateHexColorCodes(String message) {
final Pattern hexPattern = Pattern.compile("&#([A-Fa-f0-9]{6})");
Matcher matcher = hexPattern.matcher(message);
StringBuffer buffer = new StringBuffer(message.length() + 4 * 8);
while (matcher.find()) {
String group = matcher.group(1);
matcher.appendReplacement(buffer, COLOR_CHAR + "x"
+ COLOR_CHAR + group.charAt(0) + COLOR_CHAR + group.charAt(1)
+ COLOR_CHAR + group.charAt(2) + COLOR_CHAR + group.charAt(3)
+ COLOR_CHAR + group.charAt(4) + COLOR_CHAR + group.charAt(5)
);
}
return matcher.appendTail(buffer).toString();
}
// Send a message with multiple placeholders
public static void sendMessage(Player p, String messageID, String... placeholderReplacements) {
sendMessage(p, ChatMessageType.CHAT, messageID, placeholderReplacements);
@@ -122,7 +101,7 @@ public class messageManager {
// Send a message to the correct channel
private static void sendMessage(Player p, ChatMessageType chatMessageType, String messageID, String... placeholderReplacements) {
String message = messages.get(messageID);
String message = getRawMessage(messageID);
int replacementIndexer = 1;
// Replace placeholders
@@ -132,16 +111,26 @@ public class messageManager {
replacementIndexer = replacementIndexer + 1;
}
// Get formatted base components from MineDown
BaseComponent[] components = new MineDown(message).toComponent();
// Convert to text component and send
p.spigot().sendMessage(chatMessageType, TextComponent.fromLegacyText(translateHexColorCodes(message)));
p.spigot().sendMessage(chatMessageType, components);
}
// Send a message with no placeholder parameters
public static void sendMessage(Player p, String messageID) {
String message = messages.get(messageID);
String message = getRawMessage(messageID);
// Get formatted base components from MineDown
BaseComponent[] components = new MineDown(message).toComponent();
// Convert to text component and send
p.spigot().sendMessage(TextComponent.fromLegacyText(translateHexColorCodes(message)));
p.spigot().sendMessage(components);
}
public static String getRawMessage(String messageID) {
return messages.get(messageID);
}
}
@@ -69,22 +69,26 @@ public class settingHandler {
public static void deleteHome(Player player, String homeName) {
if (dataManager.homeExists(player, homeName)) {
Home home = dataManager.getHome(player.getName(), homeName);
if (home.isPublic()) {
// Delete dynmap marker if it exists & if the home is public
if (HuskHomes.settings.doDynmap() && HuskHomes.settings.showPublicHomesOnDynmap()) {
dynamicMap.removeDynamicMapMarker(homeName, player.getName());
if (home != null) {
if (home.isPublic()) {
// Delete Dynmap marker if it exists & if the home is public
if (HuskHomes.settings.doDynmap() && HuskHomes.settings.showPublicHomesOnDynmap()) {
dynamicMap.removeDynamicMapMarker(homeName, player.getName());
}
PlayerDeleteHomeEvent event = new PlayerDeleteHomeEvent(player, home);
if (event.isCancelled()) {
return;
}
dataManager.deleteHome(homeName, player);
publicHomeTabCompleter.updatePublicHomeTabCache();
} else {
dataManager.deleteHome(homeName, player);
}
PlayerDeleteHomeEvent event = new PlayerDeleteHomeEvent(player, home);
if (event.isCancelled()) {
return;
}
dataManager.deleteHome(homeName, player);
publicHomeTabCompleter.updatePublicHomeTabCache();
homeTabCompleter.updatePlayerHomeCache(player);
messageManager.sendMessage(player, "home_deleted", homeName);
} else {
dataManager.deleteHome(homeName, player);
messageManager.sendMessage(player, "error_home_invalid", homeName);
}
homeTabCompleter.updatePlayerHomeCache(player);
messageManager.sendMessage(player, "home_deleted", homeName);
} else {
messageManager.sendMessage(player, "error_home_invalid", homeName);
}
+107 -78
View File
@@ -1,79 +1,108 @@
error_no_permission: '§4Error: §cYou do not have permission to execute that command.'
error_no_last_position: '§4Error: §cYou have no last position to return to!'
teleporting_last_position: '§aReturning to your last position in §l%1%§r§a seconds'
teleporting_countdown_start: '§aYou will be teleported in §l%1%§r§a seconds'
teleporting_cancelled_movement: '§cTeleportation cancelled; you moved!'
teleporting_cancelled_damage: '§cTeleportation cancelled; you took damage!'
teleporting_complete: '§aYou have been teleported!'
teleporting_action_bar_countdown: '§cTeleporting in §l%1%'
teleporting_action_bar_cancelled: '§cTeleporting cancelled!'
teleporting_please_stand_still: '§7Please stand still for that time.'
home_deleted: '§aSuccessfully deleted §l%1%§r§a home.'
warp_deleted: '§aSuccessfully deleted §l%1%§r§a warp.'
error_home_invalid: '§4Error: §cYou do not have a home named "%1%"'
error_warp_invalid: '§4Error: §cThere is no warp set named "%1%"'
error_invalid_syntax: '§4Error: §cIncorrect syntax. Usage:\n §o%1%'
edit_home_title: '§aEdit home details for §l%1%§r§a:'
edit_description: '• Description: §7%1%'
edit_location: '• Location: §7%1%, %2%, %3%'
edit_world: '• World: §7%1%'
edit_server: '• Server: §7%1%'
edit_home_privacy_private: '• Access: §cPrivate §7(Only you can use it)'
edit_home_privacy_public: '• Access: §2Public §7(Anyone can use it)'
edit_home_privacy_public_success: '§aSuccessfully made your home §l%1%§r§a open to the public.'
edit_home_privacy_public_success_economy: '§aSuccessfully made your home §l%1%§r§a open to the public for %2%'
edit_home_privacy_private_success: '§aSuccessfully made your home §l%1%§r§a private'
error_edit_home_privacy_already_public: '§4Error: §cYour home is already set to public.'
error_edit_home_privacy_already_private: '§4Error: §cYour home is already set to private.'
error_edit_home_privacy_no_permission: '§4Error: §cYou do not have permission to make homes public.'
error_edit_home_invalid_description: '§4Error: §cHome descriptions may only contain alphanumeric (A-Z, 0-9) characters, hyphens (-) and underscores (_) and must be less than 255 characters in length'
edit_home_update_location: '§aRe-located §l%1% §r§ato your current position.'
edit_home_update_description: '§aChanged the description for §l%1%§r§a to "%2%".'
edit_home_update_name: '§aSuccessfully changed your home''s name: %1% → §l%2%'
error_no_homes_set: '§4Error: §cYou haven''t set any homes!'
error_no_public_homes_set: '§4Error: §cThere aren''t any public homes set!'
error_no_warps_set: '§4Error: §cThere aren''t any warps set!'
private_home_list_page_top: '§a%1%''s Homes: (§l%2%-%3%§r§a of §l%4%§r§a)'
public_home_list_page_top: '§aPublic Homes: (§l%1%-%2%§r§a of §l%3%§r§a)'
home_list_page_empty: '§7(There are no homes to list on this page)'
warp_list_page_top: '§aWarps: (§l%1%-%2%§r§a of §l%3%§r§a)'
warp_list_page_empty: '§7(There are no warps to list on this page)'
error_public_home_invalid: '§4Error: §cCould not find a public home owned by %1% called %2%.'
error_set_home_invalid_characters: '§4Error: §cHome names must be alphanumeric (A-Z, 0-9, -_)'
error_set_home_invalid_length: '§4Error: §cHome names can only contain up to 16 characters!'
error_set_warp_invalid_characters: '§4Error: §cWarp names must be alphanumeric (A-Z,0-9, -_)'
error_set_warp_invalid_length: '§4Error: §cWarp names can only contain up to 16 characters!'
error_set_home_maximum_homes: '§4Error: §cYou can only set a maximum of %1% homes!'
error_insufficient_funds: '§4Error: §cYou do not have enough money! (Cost: %1%)'
set_home_spent_money: '§7Successfully spent %1% to set an additional home!'
set_home_used_free_slots: '§7You''ve used all of your free sethome slots (%1%); setting additional homes will cost %2% each.'
set_home_success: '§aSuccessfully set a new home called §l%1%'
set_warp_success: '§aSuccessfully set a new warp called §l%1%'
error_set_home_name_taken: '§4Error: §cYou already have a home set with that name.'
error_set_warp_name_taken: '§4Error: §cThere is already a warp set with that name.'
set_spawn_success: '§aUpdated /spawn command location for this server to your current position.'
error_spawn_undefined: '§4Error: §cThere is no spawn location defined on this server.'
error_tpa_no_pending_request: '§4Error: §cYou do not have a pending teleport request.'
error_player_not_found: '§4Error: §cCould not find the player %1%.'
return_by_death: '§7Return to where you died?:'
tpa_you_accepted: '§aYou accepted %1%''s teleport request'
tpa_you_declined: '§cYou declined %1%''s teleport request'
tpa_has_accepted: '§a%1% accepted your teleport request'
tpa_has_declined: '§c%1% declined your teleport request'
tpa_request_sent: '§aYou sent a teleport request to teleport to %1%'
tpa_request_ask: '§a%1% has requested to teleport to you'
error_no_permission: '&4Error: &cYou do not have permission to execute that command.'
error_no_last_position: '&4Error: &cYou have no last position to return to!'
teleporting_last_position: '&aReturning to your last position in &l%1%&r&a seconds'
teleporting_countdown_start: '&aYou will be teleported in &l%1%&r&a seconds'
teleporting_cancelled_movement: '&cTeleportation cancelled; you moved!'
teleporting_cancelled_damage: '&cTeleportation cancelled; you took damage!'
teleporting_complete: '&aYou have been teleported!'
teleporting_action_bar_countdown: '&cTeleporting in &l%1%'
teleporting_action_bar_cancelled: '&cTeleporting cancelled!'
teleporting_please_stand_still: '&7Please stand still for that time.'
home_deleted: '&aSuccessfully deleted &l%1%&r&a home.'
warp_deleted: '&aSuccessfully deleted &l%1%&r&a warp.'
error_home_invalid: '&4Error: &cYou do not have a home named "%1%"'
error_warp_invalid: '&4Error: &cThere is no warp set named "%1%"'
error_invalid_syntax: '&4Error: &cIncorrect syntax. Usage:\n &o%1%'
edit_home_title: '&aEdit home details for &l%1%&r&a:'
edit_description: '• Description: &7%1%'
edit_location: '• Location: &7%1%, %2%, %3%'
edit_world: '• World: &7%1%'
edit_server: '• Server: &7%1%'
edit_home_privacy_private: '• Access: &cPrivate &7(Only you can use it)'
edit_home_privacy_public: '• Access: &2Public &7(Anyone can use it)'
edit_home_privacy_public_success: '&aSuccessfully made your home &l%1%&r&a open to the public.'
edit_home_privacy_public_success_economy: '&aSuccessfully made your home &l%1%&r&a open to the public for %2%'
edit_home_privacy_private_success: '&aSuccessfully made your home &l%1%&r&a private'
error_edit_home_privacy_already_public: '&4Error: &cYour home is already set to public.'
error_edit_home_privacy_already_private: '&4Error: &cYour home is already set to private.'
error_edit_home_privacy_no_permission: '&4Error: &cYou do not have permission to make homes public.'
error_edit_home_invalid_description: '&4Error: &cHome descriptions may only contain alphanumeric (A-Z, 0-9) characters, hyphens (-) and underscores (_) and must be less than 255 characters in length'
edit_home_update_location: '&aRe-located &l%1% &r&ato your current position.'
edit_home_update_description: '&aChanged the description for &l%1%&r&a to "%2%".'
edit_home_update_name: '&aSuccessfully changed your home''s name: %1% → &l%2%'
error_no_homes_set: '&4Error: &cYou haven''t set any homes!'
error_no_public_homes_set: '&4Error: &cThere aren''t any public homes set!'
error_no_warps_set: '&4Error: &cThere aren''t any warps set!'
private_home_list_page_top: '&a%1%''s Homes: (&l%2%-%3%&r&a of &l%4%&r&a)'
public_home_list_page_top: '&aPublic Homes: (&l%1%-%2%&r&a of &l%3%&r&a)'
home_list_page_empty: '&7(There are no homes to list on this page)'
warp_list_page_top: '&aWarps: (&l%1%-%2%&r&a of &l%3%&r&a)'
warp_list_page_empty: '&7(There are no warps to list on this page)'
error_public_home_invalid: '&4Error: &cCould not find a public home owned by %1% called %2%.'
error_set_home_invalid_characters: '&4Error: &cHome names must be alphanumeric (A-Z, 0-9, -_)'
error_set_home_invalid_length: '&4Error: &cHome names can only contain up to 16 characters!'
error_set_warp_invalid_characters: '&4Error: &cWarp names must be alphanumeric (A-Z,0-9, -_)'
error_set_warp_invalid_length: '&4Error: &cWarp names can only contain up to 16 characters!'
error_set_home_maximum_homes: '&4Error: &cYou can only set a maximum of %1% homes!'
error_insufficient_funds: '&4Error: &cYou do not have enough money! (Cost: %1%)'
set_home_spent_money: '&7Successfully spent %1% to set an additional home!'
set_home_used_free_slots: '&7You''ve used all of your free set home slots (%1%); setting additional homes will cost %2% each.'
set_home_success: '&aSuccessfully set a new home called &l%1%'
set_warp_success: '&aSuccessfully set a new warp called &l%1%'
error_set_home_name_taken: '&4Error: &cYou already have a home set with that name.'
error_set_warp_name_taken: '&4Error: &cThere is already a warp set with that name.'
set_spawn_success: '&aUpdated /spawn command location for this server to your current position.'
error_spawn_undefined: '&4Error: &cThere is no spawn location defined on this server.'
error_tpa_no_pending_request: '&4Error: &cYou do not have a pending teleport request.'
error_player_not_found: '&4Error: &cCould not find the player %1%.'
return_by_death: '&7Return to where you died?:'
tpa_you_accepted: '&aYou accepted %1%''s teleport request'
tpa_you_declined: '&cYou declined %1%''s teleport request'
tpa_has_accepted: '&a%1% accepted your teleport request'
tpa_has_declined: '&c%1% declined your teleport request'
tpa_request_sent: '&aYou sent a teleport request to teleport to %1%'
tpa_request_ask: '&a%1% has requested to teleport to you'
tpa_request_buttons_prompt: 'Click an option: '
tpahere_request_sent: '§aYou sent a teleport request asking %1% to teleport to you'
tpahere_request_ask: '§a%1% has requested that you teleport to them'
error_tp_self: '§4Error: §cYou can''t teleport to yourself!'
error_rtp_invalid_dimension: '§4Error: §cYou can only randomly teleport in the overworld!'
error_rtp_cooldown: '§4Error: §cYou must wait %1% minutes before randomly teleporting again.'
rtp_spent_money: '§7Spent %1% to randomly teleport.'
error_command_disabled: '§4Error: §cThat command is disabled!'
error_console_only: '§4Error: §cThat command can only be run from the server console.'
error_tp_invalid_world: '§4Error: §cPlease specify a valid server world.'
edit_warp_title: '§aEdit details for the warp §l%1%§r§a:'
error_edit_warp_invalid_description: '§4Error: §cWarp descriptions may only contain alphanumeric (A-Z, 0-9) characters, hyphens (-) and underscores (_) and must be less than 255 characters in length'
edit_warp_update_location: '§aRe-located the warp §l%1% §r§ato your current position.'
edit_warp_update_description: '§aChanged the description for the warp §l%1%§r§a to "%2%".'
edit_warp_update_name: '§aSuccessfully changed a warp''s name: %1% → §l%2%'
tpahere_request_sent: '&aYou sent a teleport request asking %1% to teleport to you'
tpahere_request_ask: '&a%1% has requested that you teleport to them'
error_tp_self: '&4Error: &cYou can''t teleport to yourself!'
error_rtp_invalid_dimension: '&4Error: &cYou can only randomly teleport in the Overworld!'
error_rtp_cooldown: '&4Error: &cYou must wait %1% minutes before randomly teleporting again.'
rtp_spent_money: '&7Spent %1% to randomly teleport.'
error_command_disabled: '&4Error: &cThat command is disabled!'
error_console_only: '&4Error: &cThat command can only be run from the server console.'
error_tp_invalid_world: '&4Error: &cPlease specify a valid server world.'
edit_warp_title: '&aEdit details for the warp &l%1%&r&a:'
error_edit_warp_invalid_description: '&4Error: &cWarp descriptions may only contain alphanumeric (A-Z, 0-9) characters, hyphens (-) and underscores (_) and must be less than 255 characters in length'
edit_warp_update_location: '&aRe-located the warp &l%1% &r&ato your current position.'
edit_warp_update_description: '&aChanged the description for the warp &l%1%&r&a to "%2%".'
edit_warp_update_name: '&aSuccessfully changed a warp''s name: %1% → &l%2%'
list_button_next_page: '[Next Page >]'
list_button_next_page_tooltip: 'Click to view next 10'
list_button_previous_page: '[< Last Page]'
list_button_previous_page_tooltip: 'Click to view previous 10'
list_item_divider: ' • '
edit_warp_teleport_button: '[Teleport]'
edit_warp_teleport_button_tooltip: 'Teleport to this warp'
edit_warp_delete_button: '[Delete]'
edit_warp_delete_button_tooltip: 'Delete this warp'
edit_warp_relocate_button: '[Relocate]'
edit_warp_relocate_button_tooltip: 'Update this warp''s location'
edit_warp_rename_button: '[Rename]'
edit_warp_rename_button_tooltip: 'Change the name of this warp'
edit_warp_description_button: '[Edit Description]'
edit_warp_description_button_tooltip: 'Update this warp''s description'
edit_home_teleport_button: '[Teleport]'
edit_home_teleport_button_tooltip: 'Teleport to your home'
edit_home_delete_button: '[Delete]'
edit_home_delete_button_tooltip: 'Delete your home'
edit_home_relocate_button: '[Relocate]'
edit_home_relocate_button_tooltip: 'Update your home''s location'
edit_home_rename_button: '[Rename]'
edit_home_rename_button_tooltip: 'Change the name of your home'
edit_home_description_button: '[Edit Description]'
edit_home_description_button_tooltip: 'Update the description of your home'
edit_home_make_public_button: '[Make Public]'
edit_home_make_public_button_tooltip: 'Open your home to the public'
edit_home_make_private_button: '[Make Private]'
edit_home_make_private_button_tooltip: 'Make your home private'
+106 -77
View File
@@ -1,79 +1,108 @@
error_no_permission: '§4§c你并沒有此指令權限.'
error_no_last_position: '§4錯誤: §c你沒有上一個記錄點執行back!'
teleporting_last_position: '§a在§l%1%秒内將會把你傳送至上一個記錄點§r§a'
teleporting_countdown_start: '§a你將會在§l%1%§r§a内傳送'
teleporting_cancelled_movement: '§c傳送取消 原因; 移動!'
teleporting_cancelled_damage: '§c傳送取消 原因; 你被攻擊!'
teleporting_complete: '§a你已被傳送!'
teleporting_action_bar_countdown: '§c在§l%1%秒内傳送'
teleporting_action_bar_cancelled: '§c傳送已被取消!'
teleporting_please_stand_still: '§7請稍等片刻!.'
home_deleted: '§a成功取消名爲§l%1%§r§a的家.'
error_home_invalid: '§c你并沒有名爲%1%的家'
error_invalid_syntax: '§c錯誤輸入.用法:\n §o%1%'
edit_home_title: '§a編輯名爲§l%1%§r§a的家:'
edit_description: '• 介紹: §7%1%'
edit_location: '• 坐標: §7%1%, %2%, %3%'
edit_world: '• 世界: §7%1%'
edit_server: '• 伺服器: §7%1%'
edit_home_privacy_private: '• 許可權: §c私人 §7(只有你可以使用)'
edit_home_privacy_public: '• 許可權: §2公開 §7(每個人都可以使用)'
edit_home_privacy_public_success: '§a已將名爲§l%1%§r§a設置成公開'
edit_home_privacy_public_success_economy: '§a已將名爲§l%1%§r§a設置成公開(需要:%2%)'
edit_home_privacy_private_success: '§a已將名爲§l%1%§r§a設置成私人'
error_edit_home_privacy_already_public: '§4錯誤: §c你的家已設置成公開.'
error_edit_home_privacy_already_private: '§4錯誤: §c你的家已設置私人.'
error_edit_home_privacy_no_permission: '§4錯誤: §c你并沒有權限設置成公開.'
error_edit_home_invalid_description: '§4Error: §cHome descriptions may only contain alphanumeric (A-Z, 0-9) characters, hyphens (-) and underscores (_) and must be less than 255 characters in length'
edit_home_update_location: '§a將§l%1% §r§a設置成你所在的位置.'
edit_home_update_description: '§a已將§l%1%§r§a舊的介紹轉換成"%2%".'
edit_home_update_name: '§a成功幫你的家改名: %1% → §l%2%'
error_no_homes_set: '§4錯誤: §c你并沒有已設置的家!'
error_no_public_homes_set: '§4錯誤: §c伺服器並沒有任何公開的家!'
private_home_list_page_top: '§a%1%''的家: (§l%2% - %3%§r§a of §l%4%§r§a)'
public_home_list_page_top: '§a公開的家: (§l%1% - %2%§r§a of §l%3%§r§a)'
home_list_page_empty: '§7(這裏並沒有任何的家)'
error_public_home_invalid: '§4錯誤: §c找不到屬於%1%且名爲%2%的家'
error_set_home_invalid_characters: '§4錯誤: §c家的名字(A-Z, 0-9, _-)'
error_set_home_invalid_length: '§4錯誤: §c家的名字最長只能16位!'
error_set_home_maximum_homes: '§4錯誤: §c你只能設置%1%個家!'
error_insufficient_funds: '§4錯誤: §c你沒有足夠的錢設置家! (價錢: %1%)'
set_home_spent_money: '§7成功使用 %COST% 設置你的家!'
set_home_used_free_slots: '§7你已經用完了免費的家傳送點 (%1%); 設置另外的家每個需要 %2%.'
set_home_success: '§a成功設置名爲 §l%1% §a的家'
error_set_home_name_taken: '§4錯誤: §c你已經擁有相同名字的家.'
set_spawn_success: '§aUpdated /spawn command location for this server to your current position.'
error_spawn_undefined: '§4Error: §cThere is no spawn location defined on this server.'
error_tpa_no_pending_request: '§4錯誤: §c你并沒有等待中的傳送請求.'
error_player_not_found: '§4錯誤: §c找不到玩家->%1%.'
error_no_permission: '&4&c你并沒有此指令權限.'
error_no_last_position: '&4錯誤: &c你沒有上一個記錄點執行back!'
teleporting_last_position: '&a在&l%1%秒内將會把你傳送至上一個記錄點&r&a'
teleporting_countdown_start: '&a你將會在&l%1%&r&a内傳送'
teleporting_cancelled_movement: '&c傳送取消 原因; 移動!'
teleporting_cancelled_damage: '&c傳送取消 原因; 你被攻擊!'
teleporting_complete: '&a你已被傳送!'
teleporting_action_bar_countdown: '&c在&l%1%秒内傳送'
teleporting_action_bar_cancelled: '&c傳送已被取消!'
teleporting_please_stand_still: '&7請稍等片刻!.'
home_deleted: '&a成功取消名爲&l%1%&r&a的家.'
error_home_invalid: '&c你并沒有名爲%1%的家'
error_invalid_syntax: '&c錯誤輸入.用法:\n &o%1%'
edit_home_title: '&a編輯名爲&l%1%&r&a的家:'
edit_description: '• 介紹: &7%1%'
edit_location: '• 坐標: &7%1%, %2%, %3%'
edit_world: '• 世界: &7%1%'
edit_server: '• 伺服器: &7%1%'
edit_home_privacy_private: '• 許可權: &c私人 &7(只有你可以使用)'
edit_home_privacy_public: '• 許可權: &2公開 &7(每個人都可以使用)'
edit_home_privacy_public_success: '&a已將名爲&l%1%&r&a設置成公開'
edit_home_privacy_public_success_economy: '&a已將名爲&l%1%&r&a設置成公開(需要:%2%)'
edit_home_privacy_private_success: '&a已將名爲&l%1%&r&a設置成私人'
error_edit_home_privacy_already_public: '&4錯誤: &c你的家已設置成公開.'
error_edit_home_privacy_already_private: '&4錯誤: &c你的家已設置私人.'
error_edit_home_privacy_no_permission: '&4錯誤: &c你并沒有權限設置成公開.'
error_edit_home_invalid_description: '&4Error: &cHome descriptions may only contain alphanumeric (A-Z, 0-9) characters, hyphens (-) and underscores (_) and must be less than 255 characters in length'
edit_home_update_location: '&a將&l%1% &r&a設置成你所在的位置.'
edit_home_update_description: '&a已將&l%1%&r&a舊的介紹轉換成"%2%".'
edit_home_update_name: '&a成功幫你的家改名: %1% → &l%2%'
error_no_homes_set: '&4錯誤: &c你并沒有已設置的家!'
error_no_public_homes_set: '&4錯誤: &c伺服器並沒有任何公開的家!'
private_home_list_page_top: '&a%1%''的家: (&l%2% - %3%&r&a of &l%4%&r&a)'
public_home_list_page_top: '&a公開的家: (&l%1% - %2%&r&a of &l%3%&r&a)'
home_list_page_empty: '&7(這裏並沒有任何的家)'
error_public_home_invalid: '&4錯誤: &c找不到屬於%1%且名爲%2%的家'
error_set_home_invalid_characters: '&4錯誤: &c家的名字(A-Z, 0-9, _-)'
error_set_home_invalid_length: '&4錯誤: &c家的名字最長只能16位!'
error_set_home_maximum_homes: '&4錯誤: &c你只能設置%1%個家!'
error_insufficient_funds: '&4錯誤: &c你沒有足夠的錢設置家! (價錢: %1%)'
set_home_spent_money: '&7成功使用 %COST% 設置你的家!'
set_home_used_free_slots: '&7你已經用完了免費的家傳送點 (%1%); 設置另外的家每個需要 %2%.'
set_home_success: '&a成功設置名爲 &l%1% &a的家'
error_set_home_name_taken: '&4錯誤: &c你已經擁有相同名字的家.'
set_spawn_success: '&aUpdated /spawn command location for this server to your current position.'
error_spawn_undefined: '&4Error: &cThere is no spawn location defined on this server.'
error_tpa_no_pending_request: '&4錯誤: &c你并沒有等待中的傳送請求.'
error_player_not_found: '&4錯誤: &c找不到玩家->%1%.'
return_by_death: '返回到你死去的地方?:'
tpa_you_accepted: '§a你已接受 %1% 的傳送請求'
tpa_you_declined: '§c你已拒絕 %1% 的傳送請求'
tpa_has_accepted: '§a%1% 接受了你的傳送請求'
tpa_has_declined: '§c%1% 拒絕了你的傳送請求'
tpa_request_sent: '§a你已發出請求將你傳送至 %1%'
tpa_request_ask: '§a%1% 請求傳送知你所在的地方'
tpa_you_accepted: '&a你已接受 %1% 的傳送請求'
tpa_you_declined: '&c你已拒絕 %1% 的傳送請求'
tpa_has_accepted: '&a%1% 接受了你的傳送請求'
tpa_has_declined: '&c%1% 拒絕了你的傳送請求'
tpa_request_sent: '&a你已發出請求將你傳送至 %1%'
tpa_request_ask: '&a%1% 請求傳送知你所在的地方'
tpa_request_buttons_prompt: '接受或拒絕: '
tpahere_request_sent: '§a你已發出請求將 %1% 傳送至你所在的地方'
tpahere_request_ask: '§a%1% 請求將你傳送至他所在的地方'
error_tp_self: '§4錯誤: §c你不能傳送到自己的位置!'
error_rtp_invalid_dimension: '§4錯誤: §c你只能在目前在世界裏隨機傳送!'
error_rtp_cooldown: '§4錯誤: §c你需要在下次隨機傳送前等待 %1% 分鐘.'
rtp_spent_money: '§7使用 %1% 以隨機傳送.'
error_command_disabled: '§4錯誤: §c此指令已被關閉!'
error_console_only: '§4錯誤: §c該指令只能被伺服器使用.'
error_tp_invalid_world: '§4錯誤: §c請輸入正確的世界名稱.'
set_warp_success: '§aSuccessfully set a new warp called §l%1%'
error_set_warp_name_taken: '§4Error: §cThere is already a warp set with that name.'
warp_deleted: '§aSuccessfully deleted §l%1%§r§a warp.'
error_warp_invalid: '§4Error: §cThere is no warp set with the name %1%'
error_set_warp_invalid_characters: '§4Error: §cWarp names must be alphanumeric (A-Z, 0-9, -_)'
error_set_warp_invalid_length: '§4Error: §cWarp names can only contain up to 16 characters!'
error_no_warps_set: '§4Error: §cThere aren''t any warps set!'
edit_warp_title: '§aEdit details for the warp §l%1%§r§a:'
error_edit_warp_invalid_description: '§4Error: §cWarp descriptions may only contain alphanumeric (A-Z, 0-9) characters, hyphens (-) and underscores (_) and must be less than 255 characters in length'
edit_warp_update_location: '§aRe-located the warp §l%1% §r§ato your current position.'
edit_warp_update_description: '§aChanged the description for the warp §l%1%§r§a to "%2%".'
edit_warp_update_name: '§aSuccessfully changed a warp''s name: %1% → §l%2%'
warp_list_page_top: '§aWarps: (§l%1%-%2%§r§a of §l%3%§r§a)'
warp_list_page_empty: '§7(There are no warps to list on this page)'
tpahere_request_sent: '&a你已發出請求將 %1% 傳送至你所在的地方'
tpahere_request_ask: '&a%1% 請求將你傳送至他所在的地方'
error_tp_self: '&4錯誤: &c你不能傳送到自己的位置!'
error_rtp_invalid_dimension: '&4錯誤: &c你只能在目前在世界裏隨機傳送!'
error_rtp_cooldown: '&4錯誤: &c你需要在下次隨機傳送前等待 %1% 分鐘.'
rtp_spent_money: '&7使用 %1% 以隨機傳送.'
error_command_disabled: '&4錯誤: &c此指令已被關閉!'
error_console_only: '&4錯誤: &c該指令只能被伺服器使用.'
error_tp_invalid_world: '&4錯誤: &c請輸入正確的世界名稱.'
set_warp_success: '&aSuccessfully set a new warp called &l%1%'
error_set_warp_name_taken: '&4Error: &cThere is already a warp set with that name.'
warp_deleted: '&aSuccessfully deleted &l%1%&r&a warp.'
error_warp_invalid: '&4Error: &cThere is no warp set with the name %1%'
error_set_warp_invalid_characters: '&4Error: &cWarp names must be alphanumeric (A-Z, 0-9, -_)'
error_set_warp_invalid_length: '&4Error: &cWarp names can only contain up to 16 characters!'
error_no_warps_set: '&4Error: &cThere aren''t any warps set!'
edit_warp_title: '&aEdit details for the warp &l%1%&r&a:'
error_edit_warp_invalid_description: '&4Error: &cWarp descriptions may only contain alphanumeric (A-Z, 0-9) characters, hyphens (-) and underscores (_) and must be less than 255 characters in length'
edit_warp_update_location: '&aRe-located the warp &l%1% &r&ato your current position.'
edit_warp_update_description: '&aChanged the description for the warp &l%1%&r&a to "%2%".'
edit_warp_update_name: '&aSuccessfully changed a warp''s name: %1% → &l%2%'
warp_list_page_top: '&aWarps: (&l%1%-%2%&r&a of &l%3%&r&a)'
warp_list_page_empty: '&7(There are no warps to list on this page)'
list_button_next_page: '[Next Page >]'
list_button_next_page_tooltip: 'Click to view next 10'
list_button_previous_page: '[< Last Page]'
list_button_previous_page_tooltip: 'Click to view previous 10'
list_item_divider: ' • '
edit_warp_teleport_button: '[Teleport]'
edit_warp_teleport_button_tooltip: 'Teleport to this warp'
edit_warp_delete_button: '[Delete]'
edit_warp_delete_button_tooltip: 'Delete this warp'
edit_warp_relocate_button: '[Relocate]'
edit_warp_relocate_button_tooltip: 'Update this warp''s location'
edit_warp_rename_button: '[Rename]'
edit_warp_rename_button_tooltip: 'Change the name of this warp'
edit_warp_description_button: '[Edit Description]'
edit_warp_description_button_tooltip: 'Update this warp''s description'
edit_home_teleport_button: '[Teleport]'
edit_home_teleport_button_tooltip: 'Teleport to your home'
edit_home_delete_button: '[Delete]'
edit_home_delete_button_tooltip: 'Delete your home'
edit_home_relocate_button: '[Relocate]'
edit_home_relocate_button_tooltip: 'Update your home''s location'
edit_home_rename_button: '[Rename]'
edit_home_rename_button_tooltip: 'Change the name of your home'
edit_home_description_button: '[Edit Description]'
edit_home_description_button_tooltip: 'Update the description of your home'
edit_home_make_public_button: '[Make Public]'
edit_home_make_public_button_tooltip: 'Open your home to the public'
edit_home_make_private_button: '[Make Private]'
edit_home_make_private_button_tooltip: 'Make your home private'