diff --git a/gradle.properties b/gradle.properties index 80c0c07..3883efa 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ yarn_mappings=1.20.1+build.10 loader_version=0.16.7 # Mod Properties -mod_version=1.16.3 +mod_version=1.16.4 maven_group=cc.reconnected archives_base_name=rcc-server diff --git a/src/main/java/cc/reconnected/server/commands/home/SetHomeCommand.java b/src/main/java/cc/reconnected/server/commands/home/SetHomeCommand.java index 9c34aba..09791dc 100644 --- a/src/main/java/cc/reconnected/server/commands/home/SetHomeCommand.java +++ b/src/main/java/cc/reconnected/server/commands/home/SetHomeCommand.java @@ -47,7 +47,8 @@ public class SetHomeCommand { var homes = playerState.homes; - if (homes.containsKey(name) && !forced) { + var exists = homes.containsKey(name); + if (exists && !forced) { var text = Component.text("You already have set this home.") .appendNewline().appendSpace() .append(Components.makeButton( @@ -62,7 +63,7 @@ public class SetHomeCommand { } var maxHomes = RccServer.CONFIG.homes.maxHomes(); - if(homes.size() >= maxHomes) { + if(homes.size() >= maxHomes && !exists) { context.getSource().sendFeedback(() -> Text.literal("You have reached the maximum amount of homes!").formatted(Formatting.RED), false); return 1; }