diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitUtil.java b/Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitUtil.java index 3d7eff493..85831db2c 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitUtil.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitUtil.java @@ -349,7 +349,7 @@ public class BukkitUtil extends WorldUtil { @Override public void setBiomes(@Nonnull final String worldName, @Nonnull final CuboidRegion region, @Nonnull final BiomeType biomeType) { final World world = getWorld(worldName); if (world == null) { - logger.warn("[P2] An error occured while setting the biome because the world was null", new RuntimeException()); + logger.warn("[P2] An error occurred while setting the biome because the world was null", new RuntimeException()); return; } final Biome biome = BukkitAdapter.adapt(biomeType); diff --git a/Core/src/main/java/com/plotsquared/core/command/Claim.java b/Core/src/main/java/com/plotsquared/core/command/Claim.java index d73cd8411..28fa18d55 100644 --- a/Core/src/main/java/com/plotsquared/core/command/Claim.java +++ b/Core/src/main/java/com/plotsquared/core/command/Claim.java @@ -175,7 +175,7 @@ public class Claim extends SubCommand { try { TaskManager.getPlatformImplementation().sync(() -> { if (!plot.claim(player, true, finalSchematic, false)) { - logger.info(TranslatableCaption.of("core.prefix") + String + logger.info(TranslatableCaption.of("") + String .format("Failed to claim plot %s", plot.getId().toCommaSeparatedString())); player.sendMessage(TranslatableCaption.of("working.plot_not_claimed")); plot.setOwnerAbs(null); @@ -197,7 +197,7 @@ public class Claim extends SubCommand { e.printStackTrace(); } }, () -> { - logger.info(TranslatableCaption.of("core.prefix") + String + logger.info(TranslatableCaption.of("") + String .format("Failed to add plot %s to the database", plot.getId().toCommaSeparatedString())); player.sendMessage(TranslatableCaption.of("working.plot_not_claimed")); diff --git a/Core/src/main/java/com/plotsquared/core/command/Cluster.java b/Core/src/main/java/com/plotsquared/core/command/Cluster.java index 6359ed1a9..497a8a701 100644 --- a/Core/src/main/java/com/plotsquared/core/command/Cluster.java +++ b/Core/src/main/java/com/plotsquared/core/command/Cluster.java @@ -609,10 +609,7 @@ public class Cluster extends SubCommand { } return true; } - case "members": - case "admin": - case "helper": - case "helpers": { + case "members": { if (!Permissions.hasPermission(player, Permission.PERMISSION_CLUSTER_HELPERS)) { player.sendMessage( TranslatableCaption.of("permission.no_permission"), @@ -623,7 +620,7 @@ public class Cluster extends SubCommand { if (args.length != 3) { player.sendMessage( TranslatableCaption.of("commandconfig.command_syntax"), - Template.of("value", "/plot cluster ") + Template.of("value", "/plot cluster members ") ); return false; } @@ -658,7 +655,7 @@ public class Cluster extends SubCommand { } else { player.sendMessage( TranslatableCaption.of("commandconfig.command_syntax"), - Template.of("value", "/plot cluster helpers ") + Template.of("value", "/plot cluster members ") ); } } diff --git a/Core/src/main/java/com/plotsquared/core/command/Debug.java b/Core/src/main/java/com/plotsquared/core/command/Debug.java index 2e2b01678..c587029d7 100644 --- a/Core/src/main/java/com/plotsquared/core/command/Debug.java +++ b/Core/src/main/java/com/plotsquared/core/command/Debug.java @@ -73,7 +73,7 @@ public class Debug extends SubCommand { @Override public boolean onCommand(PlotPlayer player, String[] args) { if (args.length == 0 ) { - player.sendMessage(StaticCaption.of("commandconfig.command_syntax"), + player.sendMessage(TranslatableCaption.of("commandconfig.command_syntax"), Template.of("value", "/plot debug ")); } if (args.length > 0) { @@ -121,11 +121,11 @@ public class Debug extends SubCommand { player.sendMessage(TranslatableCaption.of("debug.entity_categories")); EntityCategory.REGISTRY.forEach(category -> { final StringBuilder builder = - new StringBuilder(" §7- §6").append(category.getId()).append("§7: §6"); + new StringBuilder("§7- §6").append(category.getId()).append("§7: §6"); for (final EntityType entityType : category.getAll()) { builder.append(entityType.getId()).append(" "); } - player.sendMessage(StaticCaption.of("core.prefix" + builder.toString())); + player.sendMessage(StaticCaption.of("" + builder.toString())); }); EntityType.REGISTRY.values().stream().sorted(Comparator.comparing(EntityType::getId)) .forEach(entityType -> { @@ -134,7 +134,7 @@ public class Debug extends SubCommand { if (categoryCount > 0) { return; } - player.sendMessage(StaticCaption.of("core.prefix" + entityType.getName() + " is in " + player.sendMessage(StaticCaption.of("" + entityType.getName() + " is in " + categoryCount + " categories")); }); return true; diff --git a/Core/src/main/java/com/plotsquared/core/command/DebugExec.java b/Core/src/main/java/com/plotsquared/core/command/DebugExec.java index a936b40a1..41c738cc9 100644 --- a/Core/src/main/java/com/plotsquared/core/command/DebugExec.java +++ b/Core/src/main/java/com/plotsquared/core/command/DebugExec.java @@ -334,11 +334,9 @@ public class DebugExec extends SubCommand { } else { player.sendMessage(TranslatableCaption.of("debugexec.expiry_already_started")); } - case "h": - case "he": case "?": case "help": - player.sendMessage(StaticCaption.of("Possible sub commands: /plot debugexec <" + StringMan.join(allowed_params, " | ") + ">")); + player.sendMessage(StaticCaption.of("Possible sub commands: /plot debugexec <" + StringMan.join(allowed_params, " | ") + ">")); return false; case "addcmd": try { diff --git a/Core/src/main/java/com/plotsquared/core/command/MainCommand.java b/Core/src/main/java/com/plotsquared/core/command/MainCommand.java index e151c50cb..4e9b366cf 100644 --- a/Core/src/main/java/com/plotsquared/core/command/MainCommand.java +++ b/Core/src/main/java/com/plotsquared/core/command/MainCommand.java @@ -315,7 +315,8 @@ public class MainCommand extends Command { player.sendMessage(TranslatableCaption.of("errors.error"), net.kyori.adventure.text.minimessage.Template.of("value", message)); } else { - player.sendMessage(TranslatableCaption.of("errors.error"), net.kyori.adventure.text.minimessage.Template.of("value", "")); + player.sendMessage( + TranslatableCaption.of("errors.error_console")); } } // Reset command scope // diff --git a/Core/src/main/java/com/plotsquared/core/command/Reload.java b/Core/src/main/java/com/plotsquared/core/command/Reload.java index 944fadf1c..f509d446a 100644 --- a/Core/src/main/java/com/plotsquared/core/command/Reload.java +++ b/Core/src/main/java/com/plotsquared/core/command/Reload.java @@ -39,7 +39,6 @@ import com.plotsquared.core.plot.world.PlotAreaManager; import javax.annotation.Nonnull; import java.io.File; -import java.io.IOException; import java.util.Objects; @CommandDeclaration(command = "reload", diff --git a/Core/src/main/resources/lang/messages_en.json b/Core/src/main/resources/lang/messages_en.json index 7d925dc7f..7c309c43a 100644 --- a/Core/src/main/resources/lang/messages_en.json +++ b/Core/src/main/resources/lang/messages_en.json @@ -301,7 +301,7 @@ "errors.invalid_player": "Player not found: .", "errors.invalid_player_offline": " must be online.", "errors.invalid_command_flag": "Invalid command flag: ", - "errors.error": "An error occurred: ", + "errors.error": "An error occurred: ", "errors.error_create": "An error occurred while creating the world: ", "errors.error_console": "An error occurred. See the console for more information.", "errors.command_went_wrong": "Something went wrong when executing that command...",