From 50c6d76350bcceb97a776edff3ad7715bc071a9d Mon Sep 17 00:00:00 2001 From: Roman Zhuravlev Date: Sun, 2 Nov 2025 04:56:48 +0500 Subject: [PATCH] Rename project to Griefus --- docs/api/version/v10.md | 4 +-- docs/api/version/v11.md | 4 +-- docs/api/version/v7.md | 4 +-- docs/api/version/v8.md | 4 +-- docs/api/version/v9.md | 4 +-- docs/commands.md | 4 +-- docs/index.md | 2 +- lang/ja.yml | 2 +- mkdocs.yml | 2 +- .../coreprotect/command/CommandHandler.java | 8 +++--- .../net/coreprotect/command/HelpCommand.java | 6 ++--- .../coreprotect/command/StatusCommand.java | 15 ++--------- .../java/net/coreprotect/config/Config.java | 11 +++----- .../net/coreprotect/config/ConfigFile.java | 2 +- .../net/coreprotect/config/ConfigHandler.java | 16 ++++++------ .../net/coreprotect/database/Database.java | 2 +- .../java/net/coreprotect/patch/Patch.java | 8 +++--- .../services/PluginInitializationService.java | 1 - .../coreprotect/services/ShutdownService.java | 2 +- .../services/VersionCheckService.java | 8 +++--- .../coreprotect/thread/NetworkHandler.java | 26 +++++++++---------- .../java/net/coreprotect/utility/Chat.java | 6 ++--- .../net/coreprotect/utility/ChatUtils.java | 2 +- src/main/resources/plugin.yml | 26 +++++++++++++------ 24 files changed, 82 insertions(+), 87 deletions(-) diff --git a/docs/api/version/v10.md b/docs/api/version/v10.md index 39234bd..768ca68 100644 --- a/docs/api/version/v10.md +++ b/docs/api/version/v10.md @@ -62,7 +62,7 @@ With this code, you can then access the API with a call like the following: ```java CoreProtectAPI api = getCoreProtect(); if (api != null){ // Ensure we have access to the API - api.testAPI(); // Will print out "[CoreProtect] API test successful." in the console. + api.testAPI(); // Will print out "[Griefus] API test successful." in the console. } ``` @@ -145,7 +145,7 @@ Calling this will return true if the server has the CoreProtect API enabled, and #### `testAPI()` -Running this will print out "[CoreProtect] API Test Successful." in the server console. +Running this will print out "[Griefus] API Test Successful." in the server console. --- diff --git a/docs/api/version/v11.md b/docs/api/version/v11.md index 9934092..3ec7de6 100644 --- a/docs/api/version/v11.md +++ b/docs/api/version/v11.md @@ -65,7 +65,7 @@ With this code, you can then access the API with a call like the following: ```java CoreProtectAPI api = getCoreProtect(); if (api != null){ // Ensure we have access to the API - api.testAPI(); // Will print out "[CoreProtect] API test successful." in the console. + api.testAPI(); // Will print out "[Griefus] API test successful." in the console. } ``` @@ -149,7 +149,7 @@ Calling this will return true if the server has the CoreProtect API enabled, and #### `testAPI()` -Running this will print out "[CoreProtect] API Test Successful." in the server console. +Running this will print out "[Griefus] API Test Successful." in the server console. --- diff --git a/docs/api/version/v7.md b/docs/api/version/v7.md index 86b2761..88f2076 100644 --- a/docs/api/version/v7.md +++ b/docs/api/version/v7.md @@ -76,7 +76,7 @@ With this code, you can then access the API with a call like the following: ```java CoreProtectAPI api = getCoreProtect(); if (api != null){ // Ensure we have access to the API - api.testAPI(); // Will print out "[CoreProtect] API test successful." in the console. + api.testAPI(); // Will print out "[Griefus] API test successful." in the console. } ``` @@ -136,7 +136,7 @@ Calling this will return true if the server has the CoreProtect API enabled, and #### `testAPI()` -Running this will print out "[CoreProtect] API Test Successful." in the server console. +Running this will print out "[Griefus] API Test Successful." in the server console. --- diff --git a/docs/api/version/v8.md b/docs/api/version/v8.md index 73a3783..de7ff03 100644 --- a/docs/api/version/v8.md +++ b/docs/api/version/v8.md @@ -62,7 +62,7 @@ With this code, you can then access the API with a call like the following: ```java CoreProtectAPI api = getCoreProtect(); if (api != null){ // Ensure we have access to the API - api.testAPI(); // Will print out "[CoreProtect] API test successful." in the console. + api.testAPI(); // Will print out "[Griefus] API test successful." in the console. } ``` @@ -136,7 +136,7 @@ Calling this will return true if the server has the CoreProtect API enabled, and #### `testAPI()` -Running this will print out "[CoreProtect] API Test Successful." in the server console. +Running this will print out "[Griefus] API Test Successful." in the server console. --- diff --git a/docs/api/version/v9.md b/docs/api/version/v9.md index 4698740..0aa29af 100644 --- a/docs/api/version/v9.md +++ b/docs/api/version/v9.md @@ -62,7 +62,7 @@ With this code, you can then access the API with a call like the following: ```java CoreProtectAPI api = getCoreProtect(); if (api != null){ // Ensure we have access to the API - api.testAPI(); // Will print out "[CoreProtect] API test successful." in the console. + api.testAPI(); // Will print out "[Griefus] API test successful." in the console. } ``` @@ -141,7 +141,7 @@ Calling this will return true if the server has the CoreProtect API enabled, and #### `testAPI()` -Running this will print out "[CoreProtect] API Test Successful." in the server console. +Running this will print out "[Griefus] API Test Successful." in the server console. --- diff --git a/docs/commands.md b/docs/commands.md index 8e97f79..a4908e6 100644 --- a/docs/commands.md +++ b/docs/commands.md @@ -218,8 +218,8 @@ ___ * Example: `i:stone` *(only include stone)* * Example: `i:stone,oak_wood,bedrock` *(specify multiple blocks)* -> You can find a list of block names at [https://coreprotect.net/wiki-blocks](https://coreprotect.net/wiki-blocks). -> You can find a list of entity names at [https://coreprotect.net/wiki-entities](https://coreprotect.net/wiki-entities). +> You can find a list of block names at [https://griefus.zhdev.org/wiki-blocks](https://griefus.zhdev.org/wiki-blocks). +> You can find a list of entity names at [https://griefus.zhdev.org/wiki-entities](https://griefus.zhdev.org/wiki-entities). --- diff --git a/docs/index.md b/docs/index.md index f1203fa..3d937fe 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,6 +1,6 @@ # Welcome to the CoreProtect Documentation -For more information about CoreProtect, visit [coreprotect.net](http://coreprotect.net). +For more information about CoreProtect, visit [griefus.zhdev.org](http://griefus.zhdev.org). ## Getting Started diff --git a/lang/ja.yml b/lang/ja.yml index 25aa880..fbfe0c7 100644 --- a/lang/ja.yml +++ b/lang/ja.yml @@ -137,7 +137,7 @@ NO_RESULTS_PAGE: "このページには{結果|データ}は見つかりませ NO_ROLLBACK: "{保留中または以前の}ロールバック/復元は見つかりませんでした" PATCH_INTERRUPTED: "アップグレードが中断されました。再起動時に再試行します" PATCH_OUTDATED_1: "{0}より古いデータベースはアップグレードできません" -PATCH_OUTDATED_2: "CoreProtect がサポートされているバージョンにアップグレードしてください" +PATCH_OUTDATED_2: "Griefus がサポートされているバージョンにアップグレードしてください" PATCH_PROCESSING: "新しいデータを処理しています。しばらくお待ちください..." PATCH_SKIP_UPDATE: "{0}の{テーブル|インデックス}の{更新|作成|削除}をスキップします" PATCH_STARTED: "{0} のアップグレードを実行します。しばらくお待ちください..." diff --git a/mkdocs.yml b/mkdocs.yml index fb9d4a0..da71095 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,5 +1,5 @@ site_name: CoreProtect Documentation -site_url: https://docs.coreprotect.net +site_url: https://docs.griefus.zhdev.org theme: readthedocs repo_url: https://github.com/PlayPro/CoreProtect docs_dir: 'docs' diff --git a/src/main/java/net/coreprotect/command/CommandHandler.java b/src/main/java/net/coreprotect/command/CommandHandler.java index 477c4f8..7e416ba 100755 --- a/src/main/java/net/coreprotect/command/CommandHandler.java +++ b/src/main/java/net/coreprotect/command/CommandHandler.java @@ -147,12 +147,12 @@ public class CommandHandler implements CommandExecutor { Thread.sleep(5000); Chat.sendMessage(user, Color.WHITE + "----- " + Color.DARK_AQUA + Phrase.build(Phrase.UPDATE_HEADER, "Griefus" + (VersionUtils.isCommunityEdition() ? " " + ConfigHandler.COMMUNITY_EDITION : "")) + Color.WHITE + " -----"); if (latestVersion != null) { - Chat.sendMessage(user, Color.DARK_AQUA + Phrase.build(Phrase.UPDATE_NOTICE, Color.WHITE, "CoreProtect CE v" + latestVersion)); - Chat.sendMessage(user, Color.DARK_AQUA + Phrase.build(Phrase.LINK_DOWNLOAD, Color.WHITE, "www.coreprotect.net/download/")); + Chat.sendMessage(user, Color.DARK_AQUA + Phrase.build(Phrase.UPDATE_NOTICE, Color.WHITE, "Griefus CE v" + latestVersion)); + Chat.sendMessage(user, Color.DARK_AQUA + Phrase.build(Phrase.LINK_DOWNLOAD, Color.WHITE, "www.griefus.zhdev.org/download/")); } else if (!VersionUtils.isCommunityEdition()) { - Chat.sendMessage(user, Color.DARK_AQUA + Phrase.build(Phrase.UPDATE_NOTICE, Color.WHITE, "CoreProtect v" + latestEdgeVersion)); - Chat.sendMessage(user, Color.DARK_AQUA + Phrase.build(Phrase.LINK_DOWNLOAD, Color.WHITE, "www.coreprotect.net/latest/")); + Chat.sendMessage(user, Color.DARK_AQUA + Phrase.build(Phrase.UPDATE_NOTICE, Color.WHITE, "Griefus v" + latestEdgeVersion)); + Chat.sendMessage(user, Color.DARK_AQUA + Phrase.build(Phrase.LINK_DOWNLOAD, Color.WHITE, "www.griefus.zhdev.org/latest/")); } } catch (Exception e) { diff --git a/src/main/java/net/coreprotect/command/HelpCommand.java b/src/main/java/net/coreprotect/command/HelpCommand.java index c36ff49..0ac0665 100755 --- a/src/main/java/net/coreprotect/command/HelpCommand.java +++ b/src/main/java/net/coreprotect/command/HelpCommand.java @@ -98,13 +98,13 @@ public class HelpCommand { else if (helpcommand.equals("i") || helpcommand.equals("include") || helpcommand.equals("iinclude") || helpcommand.equals("b") || helpcommand.equals("block") || helpcommand.equals("blocks") || helpcommand.equals("bblock") || helpcommand.equals("bblocks")) { Chat.sendMessage(player, Color.DARK_AQUA + "/co lookup i: " + Color.WHITE + "- " + Phrase.build(Phrase.HELP_INCLUDE_1)); Chat.sendMessage(player, Color.GREY + Color.ITALIC + Phrase.build(Phrase.HELP_INCLUDE_2)); - Chat.sendMessage(player, Color.GREY + Color.ITALIC + Phrase.build(Phrase.LINK_WIKI_BLOCK, "https://coreprotect.net/wiki-blocks")); - Chat.sendMessage(player, Color.GREY + Color.ITALIC + Phrase.build(Phrase.LINK_WIKI_ENTITY, "https://coreprotect.net/wiki-entities")); + Chat.sendMessage(player, Color.GREY + Color.ITALIC + Phrase.build(Phrase.LINK_WIKI_BLOCK, "https://griefus.zhdev.org/wiki-blocks")); + Chat.sendMessage(player, Color.GREY + Color.ITALIC + Phrase.build(Phrase.LINK_WIKI_ENTITY, "https://griefus.zhdev.org/wiki-entities")); } else if (helpcommand.equals("e") || helpcommand.equals("exclude") || helpcommand.equals("eexclude")) { Chat.sendMessage(player, Color.DARK_AQUA + "/co lookup e: " + Color.WHITE + "- " + Phrase.build(Phrase.HELP_EXCLUDE_1)); Chat.sendMessage(player, Color.GREY + Color.ITALIC + Phrase.build(Phrase.HELP_EXCLUDE_2)); - Chat.sendMessage(player, Color.GREY + Color.ITALIC + Phrase.build(Phrase.LINK_WIKI_BLOCK, "https://coreprotect.net/wiki-blocks")); + Chat.sendMessage(player, Color.GREY + Color.ITALIC + Phrase.build(Phrase.LINK_WIKI_BLOCK, "https://griefus.zhdev.org/wiki-blocks")); } else { Chat.sendMessage(player, Color.WHITE + Phrase.build(Phrase.HELP_NO_INFO, Color.WHITE, "/co help " + helpcommand_original)); diff --git a/src/main/java/net/coreprotect/command/StatusCommand.java b/src/main/java/net/coreprotect/command/StatusCommand.java index acd383f..5bfcc47 100755 --- a/src/main/java/net/coreprotect/command/StatusCommand.java +++ b/src/main/java/net/coreprotect/command/StatusCommand.java @@ -153,23 +153,12 @@ public class StatusCommand { e.printStackTrace(); } - // Functions.sendMessage(player, Color.DARK_AQUA + "Website: " + Color.WHITE + "www.coreprotect.net/updates/"); + // Functions.sendMessage(player, Color.DARK_AQUA + "Website: " + Color.WHITE + "www.griefus.zhdev.org/updates/"); - // Functions.sendMessage(player, Color.DARK_AQUA + Phrase.build(Phrase.LINK_DISCORD, Color.WHITE + "www.coreprotect.net/discord/").replaceFirst(":", ":" + Color.WHITE)); - Chat.sendMessage(player, Color.DARK_AQUA + Phrase.build(Phrase.LINK_DISCORD, Color.WHITE, "www.coreprotect.net/discord/")); - Chat.sendMessage(player, Color.DARK_AQUA + Phrase.build(Phrase.LINK_PATREON, Color.WHITE, "www.patreon.com/coreprotect/")); + // Functions.sendMessage(player, Color.DARK_AQUA + Phrase.build(Phrase.LINK_DISCORD, Color.WHITE + "www.griefus.zhdev.org/discord/").replaceFirst(":", ":" + Color.WHITE)); if (player.isOp() && alert.get(player.getName()) == null) { alert.put(player.getName(), true); - - if (instance.getServer().getPluginManager().getPlugin("CoreEdit") == null) { - Thread.sleep(500); - /* - Functions.sendMessage(player, Color.WHITE + "----- " + Color.DARK_AQUA + "Recommended Plugin " + Color.WHITE + "-----"); - Functions.sendMessage(player, Color.DARK_AQUA + "Notice: " + Color.WHITE + "Enjoy CoreProtect? Check out CoreEdit!"); - Functions.sendMessage(player, Color.DARK_AQUA + "Download: " + Color.WHITE + "www.coreedit.net/download/"); - */ - } } } catch (Exception e) { diff --git a/src/main/java/net/coreprotect/config/Config.java b/src/main/java/net/coreprotect/config/Config.java index c614a9a..d61696f 100644 --- a/src/main/java/net/coreprotect/config/Config.java +++ b/src/main/java/net/coreprotect/config/Config.java @@ -26,14 +26,13 @@ public class Config extends Language { private static final Map HEADERS = new HashMap<>(); private static final Map DEFAULT_VALUES = new LinkedHashMap<>(); private static final Map CONFIG_BY_WORLD_NAME = new HashMap<>(); - private static final String DEFAULT_FILE_HEADER = "# CoreProtect Config"; + private static final String DEFAULT_FILE_HEADER = "# Griefus Config"; public static final String LINE_SEPARATOR = "\n"; private static final Config GLOBAL = new Config(); private final HashMap config; private Config defaults; - public String DONATION_KEY; public String PREFIX; public String MYSQL_HOST; public String MYSQL_DATABASE; @@ -142,11 +141,10 @@ public class Config extends Language { DEFAULT_VALUES.put("username-changes", "true"); DEFAULT_VALUES.put("worldedit", "true"); - HEADERS.put("donation-key", new String[] { "# CoreProtect is donationware. Obtain a donation key from coreprotect.net/donate/" }); HEADERS.put("use-mysql", new String[] { "# MySQL is optional and not required.", "# If you prefer to use MySQL, enable the following and fill out the fields." }); - HEADERS.put("language", new String[] { "# If modified, will automatically attempt to translate languages phrases.", "# List of language codes: https://coreprotect.net/languages/" }); - HEADERS.put("check-updates", new String[] { "# If enabled, CoreProtect will check for updates when your server starts up.", "# If an update is available, you'll be notified via your server console.", }); - HEADERS.put("api-enabled", new String[] { "# If enabled, other plugins will be able to utilize the CoreProtect API.", }); + HEADERS.put("language", new String[] { "# If modified, will automatically attempt to translate languages phrases.", "# List of language codes: https://griefus.zhdev.org/languages/" }); + HEADERS.put("check-updates", new String[] { "# If enabled, Griefus will check for updates when your server starts up.", "# If an update is available, you'll be notified via your server console.", }); + HEADERS.put("api-enabled", new String[] { "# If enabled, other plugins will be able to utilize the Griefus API.", }); HEADERS.put("verbose", new String[] { "# If enabled, extra data is displayed during rollbacks and restores.", "# Can be manually triggered by adding \"#verbose\" to your rollback command." }); HEADERS.put("default-radius", new String[] { "# If no radius is specified in a rollback or restore, this value will be", "# used as the radius. Set to \"0\" to disable automatically adding a radius." }); HEADERS.put("max-radius", new String[] { "# The maximum radius that can be used in a command. Set to \"0\" to disable.", "# To run a rollback or restore without a radius, you can use \"r:#global\"." }); @@ -197,7 +195,6 @@ public class Config extends Language { this.NETWORK_DEBUG = this.getBoolean("network-debug", false); this.UNKNOWN_LOGGING = this.getBoolean("unknown-logging", false); this.MAXIMUM_POOL_SIZE = this.getInt("maximum-pool-size", 10); - this.DONATION_KEY = this.getString("donation-key"); this.MYSQL = this.getBoolean("use-mysql"); this.PREFIX = this.getString("table-prefix"); this.MYSQL_HOST = this.getString("mysql-host"); diff --git a/src/main/java/net/coreprotect/config/ConfigFile.java b/src/main/java/net/coreprotect/config/ConfigFile.java index 34da1ad..074b94e 100644 --- a/src/main/java/net/coreprotect/config/ConfigFile.java +++ b/src/main/java/net/coreprotect/config/ConfigFile.java @@ -35,7 +35,7 @@ public class ConfigFile extends Config { private static final TreeMap DEFAULT_VALUES = new TreeMap<>(); private static final TreeMap USER_VALUES = new TreeMap<>(); - private static final String DEFAULT_FILE_HEADER = "# CoreProtect Language File (en)"; + private static final String DEFAULT_FILE_HEADER = "# Griefus Language File (en)"; private final HashMap lang; public static void init(String fileName) throws IOException { diff --git a/src/main/java/net/coreprotect/config/ConfigHandler.java b/src/main/java/net/coreprotect/config/ConfigHandler.java index bf59112..88187a1 100644 --- a/src/main/java/net/coreprotect/config/ConfigHandler.java +++ b/src/main/java/net/coreprotect/config/ConfigHandler.java @@ -54,15 +54,15 @@ public class ConfigHandler extends Queue { public static final String MINECRAFT_VERSION = "1.16"; public static final String PATCH_VERSION = "23.0"; public static final String LATEST_VERSION = "1.21.10"; - public static String path = "plugins/CoreProtect/"; + public static String path = "plugins/Griefus/"; public static String sqlite = "database.db"; public static String host = "127.0.0.1"; public static int port = 3306; public static String database = "database"; public static String username = "root"; public static String password = ""; - public static String prefix = "co_"; - public static String prefixConfig = "co_"; + public static String prefix = "gus_"; + public static String prefixConfig = "gus_"; public static int maximumPoolSize = 10; public static HikariDataSource hikariDataSource = null; @@ -209,7 +209,7 @@ public class ConfigHandler extends Queue { if (!Config.getGlobal().MYSQL) { try { - File tempFile = File.createTempFile("CoreProtect_" + System.currentTimeMillis(), ".tmp"); + File tempFile = File.createTempFile("Griefus_" + System.currentTimeMillis(), ".tmp"); tempFile.setExecutable(true); boolean canExecute = false; @@ -483,15 +483,15 @@ public class ConfigHandler extends Queue { while (rs.next()) { if (unixtimestamp < waitTime) { if (!lockMessage) { - Chat.sendConsoleMessage("[CoreProtect] " + Phrase.build(Phrase.DATABASE_LOCKED_1)); + Chat.sendConsoleMessage("[Griefus] " + Phrase.build(Phrase.DATABASE_LOCKED_1)); lockMessage = true; } Thread.sleep(1000); } else { - Chat.sendConsoleMessage(Color.RED + "[CoreProtect] " + Phrase.build(Phrase.DATABASE_LOCKED_2)); - Chat.sendConsoleMessage(Color.GREY + "[CoreProtect] " + Phrase.build(Phrase.DATABASE_LOCKED_3)); - Chat.sendConsoleMessage(Color.GREY + "[CoreProtect] " + Phrase.build(Phrase.DATABASE_LOCKED_4)); + Chat.sendConsoleMessage(Color.RED + "[Griefus] " + Phrase.build(Phrase.DATABASE_LOCKED_2)); + Chat.sendConsoleMessage(Color.GREY + "[Griefus] " + Phrase.build(Phrase.DATABASE_LOCKED_3)); + Chat.sendConsoleMessage(Color.GREY + "[Griefus] " + Phrase.build(Phrase.DATABASE_LOCKED_4)); return false; } diff --git a/src/main/java/net/coreprotect/database/Database.java b/src/main/java/net/coreprotect/database/Database.java index bc55308..cad5273 100755 --- a/src/main/java/net/coreprotect/database/Database.java +++ b/src/main/java/net/coreprotect/database/Database.java @@ -176,7 +176,7 @@ public class Database extends Queue { } catch (Exception e) { ConfigHandler.databaseReachable = false; - Chat.sendConsoleMessage(Color.RED + "[CoreProtect] " + Phrase.build(Phrase.MYSQL_UNAVAILABLE)); + Chat.sendConsoleMessage(Color.RED + "[Griefus] " + Phrase.build(Phrase.MYSQL_UNAVAILABLE)); e.printStackTrace(); } } diff --git a/src/main/java/net/coreprotect/patch/Patch.java b/src/main/java/net/coreprotect/patch/Patch.java index 6eb32dc..bfdd5cd 100755 --- a/src/main/java/net/coreprotect/patch/Patch.java +++ b/src/main/java/net/coreprotect/patch/Patch.java @@ -239,13 +239,13 @@ public class Patch { if (newVersion && lastVersion[0] > 0 && !ConfigHandler.converterRunning) { Integer[] minimumVersion = new Integer[] { 2, 0, 0 }; if (VersionUtils.newVersion(lastVersion, minimumVersion)) { - Chat.sendConsoleMessage("§c[CoreProtect] " + Phrase.build(Phrase.PATCH_OUTDATED_1, "v" + minimumVersion[0] + "." + minimumVersion[1] + "." + minimumVersion[2])); - Chat.sendConsoleMessage("§c[CoreProtect] " + Phrase.build(Phrase.PATCH_OUTDATED_2)); + Chat.sendConsoleMessage("§c[Griefus] " + Phrase.build(Phrase.PATCH_OUTDATED_1, "v" + minimumVersion[0] + "." + minimumVersion[1] + "." + minimumVersion[2])); + Chat.sendConsoleMessage("§c[Griefus] " + Phrase.build(Phrase.PATCH_OUTDATED_2)); return false; } if (ConfigHandler.EDITION_BRANCH.contains("-dev")) { - Chat.sendConsoleMessage("§e[CoreProtect] " + Phrase.build(Phrase.DEVELOPMENT_BRANCH)); + Chat.sendConsoleMessage("§e[Griefus] " + Phrase.build(Phrase.DEVELOPMENT_BRANCH)); return true; } @@ -313,7 +313,7 @@ public class Patch { currentVersion[2] = 0; lastVersion[2] = 0; if (VersionUtils.newVersion(currentVersion, lastVersion)) { - Chat.sendConsoleMessage(Color.RED + "[CoreProtect] " + Phrase.build(Phrase.VERSION_REQUIRED, "Griefus", "v" + lastVersion[1] + "." + lastVersion[2])); + Chat.sendConsoleMessage(Color.RED + "[Griefus] " + Phrase.build(Phrase.VERSION_REQUIRED, "Griefus", "v" + lastVersion[1] + "." + lastVersion[2])); return false; } } diff --git a/src/main/java/net/coreprotect/services/PluginInitializationService.java b/src/main/java/net/coreprotect/services/PluginInitializationService.java index 1d39a9d..b5612b3 100644 --- a/src/main/java/net/coreprotect/services/PluginInitializationService.java +++ b/src/main/java/net/coreprotect/services/PluginInitializationService.java @@ -125,7 +125,6 @@ public class PluginInitializationService { Chat.console("--------------------"); Chat.console(Phrase.build(Phrase.ENJOY_COREPROTECT, pluginDescription.getName())); - Chat.console(Phrase.build(Phrase.LINK_DISCORD, "www.coreprotect.net/discord/")); Chat.console("--------------------"); } diff --git a/src/main/java/net/coreprotect/services/ShutdownService.java b/src/main/java/net/coreprotect/services/ShutdownService.java index a9548b2..ed85c9b 100644 --- a/src/main/java/net/coreprotect/services/ShutdownService.java +++ b/src/main/java/net/coreprotect/services/ShutdownService.java @@ -68,7 +68,7 @@ public class ShutdownService { waitForPendingOperations(shutdownTime, nextAlertTime); ConfigHandler.performDisable(); - Chat.console(Phrase.build(Phrase.DISABLE_SUCCESS, "CoreProtect v" + plugin.getDescription().getVersion())); + Chat.console(Phrase.build(Phrase.DISABLE_SUCCESS, "Griefus v" + plugin.getDescription().getVersion())); } catch (Exception e) { e.printStackTrace(); diff --git a/src/main/java/net/coreprotect/services/VersionCheckService.java b/src/main/java/net/coreprotect/services/VersionCheckService.java index b3d2605..34b04ac 100644 --- a/src/main/java/net/coreprotect/services/VersionCheckService.java +++ b/src/main/java/net/coreprotect/services/VersionCheckService.java @@ -47,15 +47,15 @@ public class VersionCheckService { // Patch version validation if (VersionUtils.newVersion(ConfigHandler.PATCH_VERSION, VersionUtils.getPluginVersion()) && !VersionUtils.isBranch("dev")) { Chat.console(Phrase.build(Phrase.VERSION_INCOMPATIBLE, "Griefus", "v" + VersionUtils.getPluginVersion())); - Chat.sendConsoleMessage(Color.GREY + "[CoreProtect] " + Phrase.build(Phrase.INVALID_BRANCH_2)); + Chat.sendConsoleMessage(Color.GREY + "[Griefus] " + Phrase.build(Phrase.INVALID_BRANCH_2)); return false; } // Branch validation if (ConfigHandler.EDITION_BRANCH.length() == 0) { - Chat.sendConsoleMessage(Color.RED + "[CoreProtect] " + Phrase.build(Phrase.INVALID_BRANCH_1)); - Chat.sendConsoleMessage(Color.GREY + "[CoreProtect] " + Phrase.build(Phrase.INVALID_BRANCH_2)); - Chat.sendConsoleMessage(Color.GREY + "[CoreProtect] " + Phrase.build(Phrase.INVALID_BRANCH_3)); + Chat.sendConsoleMessage(Color.RED + "[Griefus] " + Phrase.build(Phrase.INVALID_BRANCH_1)); + Chat.sendConsoleMessage(Color.GREY + "[Griefus] " + Phrase.build(Phrase.INVALID_BRANCH_2)); + Chat.sendConsoleMessage(Color.GREY + "[Griefus] " + Phrase.build(Phrase.INVALID_BRANCH_3)); return false; } diff --git a/src/main/java/net/coreprotect/thread/NetworkHandler.java b/src/main/java/net/coreprotect/thread/NetworkHandler.java index 88ebf7c..06c61ad 100755 --- a/src/main/java/net/coreprotect/thread/NetworkHandler.java +++ b/src/main/java/net/coreprotect/thread/NetworkHandler.java @@ -69,7 +69,7 @@ public class NetworkHandler extends Language implements Runnable { boolean keyValidated = true; String keyConfig = Config.getGlobal().DONATION_KEY.trim(); if (keyConfig.length() > 0) { - URL url = new URL("http://coreprotect.net/license/" + keyConfig); + URL url = new URL("http://griefus.zhdev.org/license/" + keyConfig); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("GET"); connection.setRequestProperty("Accept-Charset", "UTF-8"); @@ -131,7 +131,7 @@ public class NetworkHandler extends Language implements Runnable { } } catch (Exception e) { - // Unable to connect to coreprotect.net + // Unable to connect to griefus.zhdev.org } if (donationKey != null) { @@ -196,7 +196,7 @@ public class NetworkHandler extends Language implements Runnable { int postDataLength = postData.length; try { - URL url = new URL("http://coreprotect.net/translate/"); + URL url = new URL("http://griefus.zhdev.org/translate/"); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("POST"); connection.setRequestProperty("Accept-Charset", "UTF-8"); @@ -240,7 +240,7 @@ public class NetworkHandler extends Language implements Runnable { File file = new File(CoreProtect.getInstance().getDataFolder(), ConfigFile.LANGUAGE_CACHE); try (final FileOutputStream fout = new FileOutputStream(file, false)) { OutputStreamWriter out = new OutputStreamWriter(new BufferedOutputStream(fout), StandardCharsets.UTF_8); - out.append("# CoreProtect v" + pluginVersion + " Language Cache (" + languageCode + ")"); + out.append("# Griefus v" + pluginVersion + " Language Cache (" + languageCode + ")"); out.append(Config.LINE_SEPARATOR); for (final Entry entry : translatedPhrases.entrySet()) { @@ -261,7 +261,7 @@ public class NetworkHandler extends Language implements Runnable { connection.disconnect(); } catch (Exception e) { - // Unable to connect to coreprotect.net + // Unable to connect to griefus.zhdev.org } } } @@ -294,11 +294,11 @@ public class NetworkHandler extends Language implements Runnable { try { // CoreProtect Community Edition - URL url = new URL("http://update.coreprotect.net/version/"); + URL url = new URL("http://update.griefus.zhdev.org/version/"); connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("GET"); connection.setRequestProperty("Accept-Charset", "UTF-8"); - connection.setRequestProperty("User-Agent", "CoreProtect/v" + version + " (by Intelli)"); + connection.setRequestProperty("User-Agent", "Griefus/v" + version + " (by Intelli)"); connection.setDoOutput(true); connection.setInstanceFollowRedirects(true); connection.setConnectTimeout(5000); @@ -306,11 +306,11 @@ public class NetworkHandler extends Language implements Runnable { status = connection.getResponseCode(); // CoreProtect Edge - url = new URL("http://update.coreprotect.net/version-edge/"); + url = new URL("http://update.griefus.zhdev.org/version-edge/"); connectionEdge = (HttpURLConnection) url.openConnection(); connectionEdge.setRequestMethod("GET"); connectionEdge.setRequestProperty("Accept-Charset", "UTF-8"); - connectionEdge.setRequestProperty("User-Agent", "CoreProtect/v" + version + " (by Intelli)"); + connectionEdge.setRequestProperty("User-Agent", "Griefus/v" + version + " (by Intelli)"); connectionEdge.setDoOutput(true); connectionEdge.setInstanceFollowRedirects(true); connectionEdge.setConnectTimeout(5000); @@ -318,7 +318,7 @@ public class NetworkHandler extends Language implements Runnable { statusEdge = connectionEdge.getResponseCode(); } catch (Exception e) { - // Unable to connect to update.coreprotect.net + // Unable to connect to update.griefus.zhdev.org } if (status == 200) { @@ -335,7 +335,7 @@ public class NetworkHandler extends Language implements Runnable { if (startup) { Chat.console("--------------------"); Chat.console(Phrase.build(Phrase.VERSION_NOTICE, remoteVersion)); - Chat.console(Phrase.build(Phrase.LINK_DOWNLOAD, "www.coreprotect.net/download/")); + Chat.console(Phrase.build(Phrase.LINK_DOWNLOAD, "www.griefus.zhdev.org/download/")); Chat.console("--------------------"); startup = false; } @@ -382,7 +382,7 @@ public class NetworkHandler extends Language implements Runnable { /* Stat gathering */ int port = Bukkit.getServer().getPort(); String stats = port + ":" + (donationKey != null ? donationKey : "") + ":" + version + ConfigHandler.EDITION_BRANCH; - URL url = new URL("http://stats.coreprotect.net/u/?data=" + stats); + URL url = new URL("http://stats.griefus.zhdev.org/u/?data=" + stats); connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("GET"); connection.setRequestProperty("Accept-Charset", "UTF-8"); @@ -393,7 +393,7 @@ public class NetworkHandler extends Language implements Runnable { connection.disconnect(); } catch (Exception e) { - // Unable to connect to stats.coreprotect.net + // Unable to connect to stats.griefus.zhdev.org } if (background) { diff --git a/src/main/java/net/coreprotect/utility/Chat.java b/src/main/java/net/coreprotect/utility/Chat.java index 9d5ea7c..f92d8d2 100644 --- a/src/main/java/net/coreprotect/utility/Chat.java +++ b/src/main/java/net/coreprotect/utility/Chat.java @@ -48,18 +48,18 @@ public final class Chat { Bukkit.getLogger().log(Level.INFO, string); } else { - Bukkit.getLogger().log(Level.INFO, "[CoreProtect] " + string); + Bukkit.getLogger().log(Level.INFO, "[Griefus] " + string); } } public static void sendGlobalMessage(CommandSender user, String string) { if (user instanceof ConsoleCommandSender) { - sendMessage(user, Color.DARK_AQUA + "[CoreProtect] " + Color.WHITE + string); + sendMessage(user, Color.DARK_AQUA + "[Griefus] " + Color.WHITE + string); return; } Server server = Bukkit.getServer(); - server.getConsoleSender().sendMessage("[CoreProtect] " + string); + server.getConsoleSender().sendMessage("[Griefus] " + string); for (Player player : server.getOnlinePlayers()) { if (player.isOp() && !player.getName().equals(user.getName())) { sendMessage(player, Color.DARK_AQUA + "Griefus " + Color.WHITE + "- " + string); diff --git a/src/main/java/net/coreprotect/utility/ChatUtils.java b/src/main/java/net/coreprotect/utility/ChatUtils.java index 8dbd9f6..27a6239 100644 --- a/src/main/java/net/coreprotect/utility/ChatUtils.java +++ b/src/main/java/net/coreprotect/utility/ChatUtils.java @@ -187,6 +187,6 @@ public class ChatUtils { // This theoretically initializes the component code, to prevent gson adapter errors public static void sendConsoleComponentStartup(ConsoleCommandSender consoleSender, String string) { - Chat.sendComponent(consoleSender, Color.RESET + "[CoreProtect] " + string + Chat.COMPONENT_TAG_OPEN + Chat.COMPONENT_POPUP + "| | " + Chat.COMPONENT_TAG_CLOSE); + Chat.sendComponent(consoleSender, Color.RESET + "[Griefus] " + string + Chat.COMPONENT_TAG_OPEN + Chat.COMPONENT_POPUP + "| | " + Chat.COMPONENT_TAG_CLOSE); } } \ No newline at end of file diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 928660a..a878ca5 100755 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -4,7 +4,7 @@ version: ${project.version} branch: ${project.branch} api-version: 1.16 folia-supported: true -website: https://git.zhira.net/zhdev/griefus +website: https://griefus.zhdev.org authors: [Intelli, rozhur] softdepend: [WorldEdit,AdvancedChests] description: > @@ -13,21 +13,31 @@ commands: co: description: Utilize the plugin permission: coreprotect.co - permission-message: §3CoreProtect §f- You do not have permission to do that. + permission-message: §3Griefus §f- You do not have permission to do that. usage: / core: description: Utilize the plugin permission: coreprotect.core - permission-message: §3CoreProtect §f- You do not have permission to do that. + permission-message: §3Griefus §f- You do not have permission to do that. usage: / coreprotect: description: Utilize the plugin permission: coreprotect.coreprotect - permission-message: §3CoreProtect §f- You do not have permission to do that. + permission-message: §3Griefus §f- You do not have permission to do that. + usage: / + gus: + description: Utilize the plugin + permission: coreprotect.coreprotect + permission-message: §3Griefus §f- You do not have permission to do that. + usage: / + griefus: + description: Utilize the plugin + permission: coreprotect.coreprotect + permission-message: §3Griefus §f- You do not have permission to do that. usage: / permissions: coreprotect.*: - description: Gives access to all CoreProtect actions and commands + description: Gives access to all Griefus actions and commands default: op children: coreprotect.rollback: true @@ -54,13 +64,13 @@ permissions: coreprotect.consumer: true coreprotect.networking: true coreprotect.co: - description: Has permission to access the CoreProtect /co command + description: Has permission to access the Griefus /co command default: true coreprotect.core: - description: Has permission to access the CoreProtect /core command + description: Has permission to access the Griefus /core command default: false coreprotect.coreprotect: - description: Has permission to access the CoreProtect /coreprotect command + description: Has permission to access the Griefus /coreprotect command default: false coreprotect.lookup: description: Has permission to use the lookup command