Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@
.getSpawnCategoryConfig(spawnCategory)
.getStringPropertyHandle()
.modifyPropertyString(property, value, action)
.onSuccess(ignore -> issuer.sendMessage("Successfully set " + property + " to " + value
.onSuccess(ignore -> issuer.sendInfo("Successfully set " + property + " to " + value

Check warning on line 116 in src/main/java/org/mvplugins/multiverse/core/commands/EntitySpawnConfigCommand.java

View workflow job for this annotation

GitHub Actions / checkstyle / checkstyle

[checkstyle] reported by reviewdog 🐶 The String " to " appears 2 times in the file. Raw Output: /github/workspace/./src/main/java/org/mvplugins/multiverse/core/commands/EntitySpawnConfigCommand.java:116:87: warning: The String " to " appears 2 times in the file. (com.puppycrawl.tools.checkstyle.checks.coding.MultipleStringLiteralsCheck)
+ " for " + spawnCategory.name() + " in " + world.getName()))
.onFailure(e -> issuer.sendMessage("Unable to set " + property + " to " + value
.onFailure(e -> issuer.sendError("Unable to set " + property + " to " + value
+ " for " + spawnCategory.name() + " in " + world.getName() + ": " + e.getMessage()));

worldManager.saveWorldsConfig();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,20 @@
final ConfigNode<Integer> tickRate = node(ConfigNode.builder("tick-rate", Integer.class)
.defaultValue(-1)
.suggester(input -> List.of("-1", "10", "100", "400", "1000"))
.validator(input -> config.getApplyEntitySpawnRate()
? Try.success(null)
: Try.failure(new IllegalStateException("Cannot set tick rate as 'apply-entity-spawn-rate' is false in config. " +

Check warning on line 172 in src/main/java/org/mvplugins/multiverse/core/world/entity/SpawnCategoryConfig.java

View workflow job for this annotation

GitHub Actions / checkstyle / checkstyle

[checkstyle] reported by reviewdog 🐶 '+' should be on a new line. Raw Output: /github/workspace/./src/main/java/org/mvplugins/multiverse/core/world/entity/SpawnCategoryConfig.java:172:138: warning: '+' should be on a new line. (com.puppycrawl.tools.checkstyle.checks.whitespace.OperatorWrapCheck)

Check warning on line 172 in src/main/java/org/mvplugins/multiverse/core/world/entity/SpawnCategoryConfig.java

View workflow job for this annotation

GitHub Actions / checkstyle / checkstyle

[checkstyle] reported by reviewdog 🐶 Line is longer than 120 characters (found 138). Raw Output: /github/workspace/./src/main/java/org/mvplugins/multiverse/core/world/entity/SpawnCategoryConfig.java:172:0: warning: Line is longer than 120 characters (found 138). (com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck)
"You can re-enable this option with '/mv config set apply-entity-spawn-rate true' command.")))
.onSetValue((oldValue, newValue) -> applyConfigToWorld())
.build());

final ConfigNode<Integer> spawnLimit = node(ConfigNode.builder("spawn-limit", Integer.class)
.defaultValue(-1)
.suggester(input -> List.of("-1", "10", "100", "400", "1000"))
.validator(input -> config.getApplyEntitySpawnLimit()
? Try.success(null)
: Try.failure(new IllegalStateException("Cannot set spawn limit as 'apply-entity-spawn-limit' is false in config. " +

Check warning on line 182 in src/main/java/org/mvplugins/multiverse/core/world/entity/SpawnCategoryConfig.java

View workflow job for this annotation

GitHub Actions / checkstyle / checkstyle

[checkstyle] reported by reviewdog 🐶 '+' should be on a new line. Raw Output: /github/workspace/./src/main/java/org/mvplugins/multiverse/core/world/entity/SpawnCategoryConfig.java:182:141: warning: '+' should be on a new line. (com.puppycrawl.tools.checkstyle.checks.whitespace.OperatorWrapCheck)

Check warning on line 182 in src/main/java/org/mvplugins/multiverse/core/world/entity/SpawnCategoryConfig.java

View workflow job for this annotation

GitHub Actions / checkstyle / checkstyle

[checkstyle] reported by reviewdog 🐶 Line is longer than 120 characters (found 141). Raw Output: /github/workspace/./src/main/java/org/mvplugins/multiverse/core/world/entity/SpawnCategoryConfig.java:182:0: warning: Line is longer than 120 characters (found 141). (com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck)
"You can re-enable this option with '/mv config set apply-entity-spawn-limit true' command.")))
.onSetValue((oldValue, newValue) -> applyConfigToWorld())
.build());

Expand Down
Loading