Skip to content

Commit

Permalink
Merge branch '1.18' into 1.19
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/main/java/folk/sisby/switchy/SwitchyCommands.java
  • Loading branch information
sisby-folk committed Sep 18, 2022
2 parents 758fce8 + b6aebf8 commit de6570f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/folk/sisby/switchy/SwitchyCommands.java
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ private static int deletePreset(ServerPlayerEntity player, SwitchyPresets preset
return 0;
}

if (!last_command.get(player.getUuid()).equalsIgnoreCase("switchy delete " + presetName)) {
if (!last_command.getOrDefault(player.getUuid(), "").equalsIgnoreCase("switchy delete " + presetName)) {
tellWarn(player, "commands.switchy.delete.warn");
tellWarn(player, "commands.switchy.list.modules", literal(presets.getModuleToggles().entrySet().stream().filter(Map.Entry::getValue).map(Map.Entry::getKey).map(Identifier::getPath).toList().toString()));
tellInvalidTry(player, "commands.switchy.invalid.confirm", "commands.switchy.delete.command", literal(presetName));
Expand All @@ -229,7 +229,7 @@ private static int disableModule(ServerPlayerEntity player, SwitchyPresets prese
return 0;
}

if (!last_command.get(player.getUuid()).equalsIgnoreCase("switchy module disable " + moduleId)) {
if (!last_command.getOrDefault(player.getUuid(), "").equalsIgnoreCase("switchy module disable " + moduleId)) {
sendMessage(player, Switchy.COMPAT_REGISTRY.get(moduleId).get().getDisableConfirmation().setStyle(FORMAT_WARN.getLeft()));
tellInvalidTry(player, "commands.switchy.invalid.confirm", "commands.switchy.module.disable.command", literal(moduleId.toString()));
return 0;
Expand Down

0 comments on commit de6570f

Please sign in to comment.