mirror of
https://github.com/hyperdefined/ToolStats.git
synced 2025-12-07 21:25:00 +00:00
add this warning
This commit is contained in:
@@ -69,6 +69,7 @@ public class CommandToolStats implements TabExecutor {
|
|||||||
if (toolStats.tokens != oldTokensStatus) {
|
if (toolStats.tokens != oldTokensStatus) {
|
||||||
// tokens are now enabled
|
// tokens are now enabled
|
||||||
if (toolStats.tokens) {
|
if (toolStats.tokens) {
|
||||||
|
sender.sendMessage(Component.text("It looks like you ENABLED the token system. While this is fine, it can break. Please restart your server instead.", NamedTextColor.YELLOW));
|
||||||
if (toolStats.config.getBoolean("tokens.craft-token")) {
|
if (toolStats.config.getBoolean("tokens.craft-token")) {
|
||||||
for (ShapedRecipe recipe : toolStats.tokenCrafting.getRecipes()) {
|
for (ShapedRecipe recipe : toolStats.tokenCrafting.getRecipes()) {
|
||||||
Bukkit.addRecipe(recipe);
|
Bukkit.addRecipe(recipe);
|
||||||
@@ -76,6 +77,7 @@ public class CommandToolStats implements TabExecutor {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// tokens are now disabled
|
// tokens are now disabled
|
||||||
|
sender.sendMessage(Component.text("It looks like you DISABLED the token system. While this is fine, it can break. Please restart your server instead.", NamedTextColor.YELLOW));
|
||||||
for (ShapedRecipe recipe : toolStats.tokenCrafting.getRecipes()) {
|
for (ShapedRecipe recipe : toolStats.tokenCrafting.getRecipes()) {
|
||||||
Bukkit.removeRecipe(recipe.getKey());
|
Bukkit.removeRecipe(recipe.getKey());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user