Rename project to Griefus

This commit is contained in:
Roman Zhuravlev 2025-11-02 04:56:48 +05:00
parent 6190c4d700
commit 50c6d76350
24 changed files with 82 additions and 87 deletions

View file

@ -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.
---

View file

@ -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.
---

View file

@ -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.
---

View file

@ -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.
---

View file

@ -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.
---

View file

@ -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).
---

View file

@ -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

View file

@ -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} のアップグレードを実行します。しばらくお待ちください..."

View file

@ -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'

View file

@ -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) {

View file

@ -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:<include> " + 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:<exclude> " + 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));

View file

@ -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) {

View file

@ -26,14 +26,13 @@ public class Config extends Language {
private static final Map<String, String[]> HEADERS = new HashMap<>();
private static final Map<String, String> DEFAULT_VALUES = new LinkedHashMap<>();
private static final Map<String, Config> 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<String, String> 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");

View file

@ -35,7 +35,7 @@ public class ConfigFile extends Config {
private static final TreeMap<String, String> DEFAULT_VALUES = new TreeMap<>();
private static final TreeMap<String, String> 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<String, String> lang;
public static void init(String fileName) throws IOException {

View file

@ -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;
}

View file

@ -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();
}
}

View file

@ -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;
}
}

View file

@ -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("--------------------");
}

View file

@ -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();

View file

@ -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;
}

View file

@ -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<Phrase, String> 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) {

View file

@ -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);

View file

@ -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);
}
}

View file

@ -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: /<command> <params>
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: /<command> <params>
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: /<command> <params>
gus:
description: Utilize the plugin
permission: coreprotect.coreprotect
permission-message: §3Griefus §f- You do not have permission to do that.
usage: /<command> <params>
griefus:
description: Utilize the plugin
permission: coreprotect.coreprotect
permission-message: §3Griefus §f- You do not have permission to do that.
usage: /<command> <params>
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