Compare commits

...
8 Commits
Author SHA1 Message Date
Ben Woo 539d5c43d1 Merge pull request #3306 from Multiverse/chore/update-game-version
Update supported game version for 1.21.7 and 1.21.8
2025-07-23 14:19:35 +08:00
Ben Woo 1664690472 Update supported game version for 1.21.7 and 1.21.8 2025-07-23 14:08:42 +08:00
Ben Woo 5e97b1169b Merge pull request #3294 from Multiverse/fix/removed-property
Add warning on removed animals and monsters world properties
2025-07-18 11:07:39 +08:00
Ben Woo c3f4f117e5 Merge pull request #3293 from Multiverse/fix/delete-tab-complete
Tab complete to include unloaded worlds for delete command
2025-07-18 11:06:54 +08:00
Ben Woo 814901b1c1 Merge pull request #3292 from Multiverse/fix/spawn-egg
Always allow spawner egg to align with v4 behaviour
2025-07-18 11:06:31 +08:00
Ben Woo c389a41cdc Add warning on removed animals and monsters world properties 2025-07-17 12:38:33 +08:00
Ben Woo 2db9ae7c66 Tab complete to include unloaded worlds for delete command 2025-07-17 11:59:24 +08:00
Ben Woo b80aea4c38 Always allow spawner egg to align with v4 behaviour 2025-07-17 11:54:56 +08:00
6 changed files with 22 additions and 5 deletions

No files matched your search

@@ -107,7 +107,7 @@ jobs:
files: '["${{ github.workspace }}/${{ inputs.plugin_name }}-${{ steps.release-info.outputs.tag_name }}.jar"]'
name: ${{ steps.release-info.outputs.tag_name }}
changelog: ${{ steps.release-artifact.outputs.body }}
game_versions: 1.21.6, 1.21.5, 1.21.4, 1.21.3, 1.21.2, 1.21.1, 1.21, 1.20.6, 1.20.5, 1.20.4, 1.20.3, 1.20.2, 1.20.1, 1.20, 1.19.4, 1.19.3, 1.19.2, 1.19.1, 1.19, 1.18.2
game_versions: 1.21.8, 1.21.7, 1.21.6, 1.21.5, 1.21.4, 1.21.3, 1.21.2, 1.21.1, 1.21, 1.20.6, 1.20.5, 1.20.4, 1.20.3, 1.20.2, 1.20.1, 1.20, 1.19.4, 1.19.3, 1.19.2, 1.19.1, 1.19, 1.18.2
version_type: ${{ steps.parse-release-type.outputs.release_type }}
loaders: bukkit, spigot, paper
dependencies: ${{ inputs.modrinth_dependencies }}
@@ -121,7 +121,7 @@ jobs:
changelog: ${{ steps.release-artifact.outputs.body }}
changelog_type: markdown
display_name: ${{ steps.release-info.outputs.tag_name }}
game_versions: 1.21.6, 1.21.5, 1.21.4, 1.21.3, 1.21.2, 1.21.1, 1.21, 1.20.6, 1.20.5, 1.20.4, 1.20.3, 1.20.2, 1.20.1, 1.20, 1.19.4, 1.19.3, 1.19.2, 1.19.1, 1.19, 1.18.2
game_versions: 1.21.8, 1.21.7, 1.21.6, 1.21.5, 1.21.4, 1.21.3, 1.21.2, 1.21.1, 1.21, 1.20.6, 1.20.5, 1.20.4, 1.20.3, 1.20.2, 1.20.1, 1.20, 1.19.4, 1.19.3, 1.19.2, 1.19.1, 1.19, 1.18.2
release_type: ${{ steps.parse-release-type.outputs.release_type }}
project_relations: ${{ inputs.dbo_project_relations }}
file_path: ${{ github.workspace }}/${{ inputs.plugin_name }}-${{ steps.release-info.outputs.tag_name }}.jar
@@ -136,5 +136,5 @@ jobs:
channel: ${{ steps.parse-release-type.outputs.release_type }}
files: '[{"path": "${{ github.workspace }}/${{ inputs.plugin_name }}-${{ steps.release-info.outputs.tag_name }}.jar", "platforms": ["PAPER"]}]'
description: ${{ steps.release-artifact.outputs.body }}
platform_dependencies: '{"PAPER": ["1.18.2-1.21.6"]}'
platform_dependencies: '{"PAPER": ["1.18.2-1.21.8"]}'
plugin_dependencies: ${{ inputs.hangar_plugin_dependencies }}
@@ -57,7 +57,7 @@ class DeleteCommand extends CoreCommand {
@Subcommand("delete")
@CommandPermission("multiverse.core.delete")
@CommandCompletion("@mvworlds:scope=loaded @flags:groupName=" + RemovePlayerFlags.NAME)
@CommandCompletion("@mvworlds:scope=both @flags:groupName=" + RemovePlayerFlags.NAME)
@Syntax("<world>")
@Description("{@@mv-core.delete.description}")
void onDeleteCommand(
@@ -23,12 +23,19 @@ import org.mvplugins.multiverse.core.locale.MVCorei18n;
import org.mvplugins.multiverse.core.world.MultiverseWorld;
import org.mvplugins.multiverse.core.world.WorldManager;
import java.util.Map;
import static org.mvplugins.multiverse.core.locale.message.MessageReplacement.*;
import static org.mvplugins.multiverse.core.locale.message.MessageReplacement.replace;
@Service
class ModifyCommand extends CoreCommand {
private static final Map<String, String> REMOVED_PROPERTIES = Map.of(
"animals", "/mv entity-spawn-config modify [world] animal set spawn <true|false>",
"monsters", "/mv entity-spawn-config modify [world] monster set spawn <true|false>"
);
private final WorldManager worldManager;
@Inject
@@ -65,6 +72,13 @@ class ModifyCommand extends CoreCommand {
@Syntax("[value]")
@Description("{@@mv-core.modify.value.description}")
@Nullable String propertyValue) {
if (REMOVED_PROPERTIES.containsKey(propertyName)) {
issuer.sendMessage(MVCorei18n.MODIFY_PROPERTYREMOVED,
replace("{property}").with(propertyName),
replace("{replacement}").with(REMOVED_PROPERTIES.get(propertyName)));
return;
}
MultiverseWorld world = worldValue.value();
if (action.isRequireValue() && propertyValue == null) {
@@ -92,7 +92,8 @@ final class MVEntityListener implements CoreListener {
// Always allow custom command and plugins to spawn creatures
if (event.getSpawnReason() == SpawnReason.CUSTOM
|| event.getSpawnReason() == SpawnReason.COMMAND
|| event.getSpawnReason() == SpawnReason.BREEDING) {
|| event.getSpawnReason() == SpawnReason.BREEDING
|| event.getSpawnReason() == SpawnReason.SPAWNER_EGG) {
return;
}
@@ -151,6 +151,7 @@ public enum MVCorei18n implements MessageKeyProvider {
MODIFY_WORLD_DESCRIPTION,
MODIFY_PROPERTY_DESCRIPTION,
MODIFY_VALUE_DESCRIPTION,
MODIFY_PROPERTYREMOVED,
MODIFY_CANNOTHAVEVALUE,
MODIFY_SPECIFYVALUE,
MODIFY_SUCCESS,
@@ -132,6 +132,7 @@ mv-core.modify.description=Modifies a world property of a given world.
mv-core.modify.world.description=Name of world you want to modify.
mv-core.modify.property.description=Property you want to modify.
mv-core.modify.value.description=Value of property.
mv-core.modify.propertyremoved=&cYou cannot modify '&3{property}&c' because it has been changed or removed. Please use '&a{replacement}&c' instead.
mv-core.modify.cannothavevalue=You cannot specify a value to {action} '{property}'.
mv-core.modify.specifyvalue=You must specify a value to {action} '{property}'.
mv-core.modify.success=&aSuccessfully {action} '&9{property}&a' to '&9{value}&a' in world &9{world}&a.