Skip to content

Commit

Permalink
Fix colouring on /mv modify
Browse files Browse the repository at this point in the history
  • Loading branch information
zax71 committed Aug 27, 2024
1 parent 278c51d commit 62c9497
Showing 1 changed file with 15 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import co.aikar.commands.annotation.Syntax;
import com.dumptruckman.minecraft.util.Logging;
import jakarta.inject.Inject;
import org.bukkit.ChatColor;
import org.jetbrains.annotations.NotNull;
import org.jvnet.hk2.annotations.Service;

Expand Down Expand Up @@ -60,17 +61,27 @@ void onModifyCommand(
String propertyValue) {
StringPropertyHandle worldPropertyHandle = world.getStringPropertyHandle();
worldPropertyHandle.modifyProperty(propertyName, propertyValue, action).onSuccess(ignore -> {
issuer.sendMessage("Property %s set to %s for world %s.".formatted(
issuer.sendMessage("Property %s%s set to %s%s for world %s%s%s.".formatted(
propertyName,
ChatColor.BLUE,
worldPropertyHandle.getProperty(propertyName).getOrNull(),
world.getName()));
ChatColor.BLUE,
ChatColor.GRAY,
world.getName(),
ChatColor.BLUE
));

Check warning on line 72 in src/main/java/org/mvplugins/multiverse/core/commands/ModifyCommand.java

View workflow job for this annotation

GitHub Actions / checkstyle / checkstyle

[checkstyle] reported by reviewdog 🐶 ')' should be on the previous line. Raw Output: /github/workspace/./src/main/java/org/mvplugins/multiverse/core/commands/ModifyCommand.java:72:13: warning: ')' should be on the previous line. (SeparatorWrapEol)
worldManager.saveWorldsConfig();
}).onFailure(exception -> {
issuer.sendMessage("Failed to %s property %s to %s for world %s.".formatted(
issuer.sendMessage("Failed to %s%s property %s%s to %s%s for world %s%s.".formatted(
action.name().toLowerCase(),
ChatColor.BLUE,
propertyName,
ChatColor.BLUE,
propertyValue,
world.getName()));
ChatColor.BLUE,
world.getName(),
ChatColor.BLUE
));

Check warning on line 84 in src/main/java/org/mvplugins/multiverse/core/commands/ModifyCommand.java

View workflow job for this annotation

GitHub Actions / checkstyle / checkstyle

[checkstyle] reported by reviewdog 🐶 ')' should be on the previous line. Raw Output: /github/workspace/./src/main/java/org/mvplugins/multiverse/core/commands/ModifyCommand.java:84:13: warning: ')' should be on the previous line. (SeparatorWrapEol)
issuer.sendMessage(exception.getMessage());
});
}
Expand Down

0 comments on commit 62c9497

Please sign in to comment.