This repository was archived by the owner on Jul 30, 2025. It is now read-only.
commands and translations overhaul#105
Merged
OliverSchlueter merged 100 commits intoFancyMcPlugins:mainfrom May 23, 2024
Merged
commands and translations overhaul#105OliverSchlueter merged 100 commits intoFancyMcPlugins:mainfrom
OliverSchlueter merged 100 commits intoFancyMcPlugins:mainfrom
Conversation
1. This commit also includes paginated `/npc help` command. 2. Some messages have not been updated yet. 3. Some messages are no longer used - marked as `N/A` and will be removed later down the line.
…ce usage of `LanguageConfig` with `Translator`
…type These are not really that useful given that interactions are currently not stored and reset throughout server restarts.
ee9ea7d to
80903ac
Compare
Collaborator
|
I'm going to go through all commands in-game and if it looks good to me, it will be merged, so the community can test these very fancy new command system. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DESCRIPTION
Goals of this PR:
Migrating commands to a framework is necessary to implement some planned features much easier. Cloud v2 has been chosen because of (1) extensible API, (2) annotations module, (3) brigadier support, (3) maturity and recognition.
Translations system provided by FancyLib should make interacting with translations cleaner.
FIXES
Fixes #81
Common states (
collidable,glowing,show_in_tab,turn_to_player) can now be toggled. Attribute values cannot be toggled with the current attribute system, at least not without unnecessary parsing and guessing the value type.Fixes #86
Unable to reproduce the issue with this build.
Fixes #87
Equipment is no longer reset after changing NPC type to other living-entity. No modification GUI but improvements to
equipmentsub-command family.TO-DO
.@Defaultannotation not working on flagsLocation argument suggestions not working properly.TO-DO (OPTIONAL, NON-BLOCKING)
ExceptionHandlerRegistrationforLocationParser.LocationParseExceptionwith a regularExceptionHandler. Depends on Incendo/cloud-minecraft (#70).CHANGLOG / REFERENCE
Important / Breaking Changes
fancynpcs.command.(command).(sub)format. New permissions are listed below.snake_caseinstead oflowerCamelCase. These sub-commands are:interactionCooldown➞interaction_cooldownturnToPlayer➞turn_to_playershowInTab➞show_in_tabserverCommand➞server_commandplayerCommand➞player_commandFancyNpcs/language/directory.config.yml).en.yml) locale is bundled with the plugin.lang.yml) is no longer used by the plugin.Command Reference
/fancynpcs feature_flags/fancynpcs feature_flagsfancynpcs.command.fancynpcs.feature_flags/fancynpcs featureFlags./fancynpcs reload/fancynpcs reloadfancynpcs.command.fancynpcs.reload/fancynpcs save/fancynpcs savefancynpcs.command.fancynpcs.save/fancynpcs version/fancynpcs versionfancynpcs.command.fancynpcs.version/npc attribute/npc attribute (npc) (set | list)fancynpcs.command.npc.attribute.(sub)listsub-command./npc collidable/npc collidable (npc) [state]fancynpcs.command.npc.collidable[state]argument is not specified./npc copy/npc copy (npc) (new_name)fancynpcs.command.npc.copyA-Z a-z 0-9 _ - /characters./npc create/npc create (name) [--position (x y z)] [--world (world)] [--type (type)]fancynpcs.command.npc.createA-Z a-z 0-9 _ - /characters./npc displayname/npc displayname (npc) (@none | name)fancynpcs.command.npc.displayname@noneinstead of<empty>./npc equipment/npc equipment (npc) (set | clear | list)fancynpcs.command.npc.equipment.(sub)clearsub-command`.listsub-command.@none,@handor valid item type as an argument./npc fix/npc fix (npc)fancynpcs.command.npc.fix/npc glowingColor/npc glowingcommand./npc glowing/npc glowing (npc) [disabled | color]fancynpcs.command.npc.glowingtrueorfalse, acceptsdisabledor color as an argument.[disabled | color]argument is not specified./npc help/npc help [page]fancynpcs.command.npc.help/npc info/npc info (npc)fancynpcs.command.npc.info/npc interaction_cooldown/npc interaction_cooldown (npc) (disabled | cooldown)fancynpcs.command.npc.interaction_cooldown/npc interactionCooldown.2min. Supported units:mssminhdmoy/npc list/npc list [--type (type)] [--sort (sort)]fancynpcs.command.npc.list/npc message/npc message (npc) (add | set | remove | clear | list | send_randmly)fancynpcs.command.npc.message.(sub)@noneinstead of<none>./npc move_here/npc move_here (npc)fancynpcs.command.npc.move_here/npc moveHere./npc move_to/npc move_to (npc) (x) (y) (z) [world] [--look-in-my-direction]fancynpcs.command.npc.move_to/npc teleport.--look-in-my-directionpresence flag that makes NPC turn in direction player is currently standing at./npc nearby/npc nearby [--radius (radius)] [--type (type)] [--sort (sort)]fancynpcs.command.npc.nearbylistsub-command but only lists NPCs in player's world./npc player_command/npc player_command (npc) (add | set | remove | clear | list)fancynpcs.command.npc.player_command.(sub)/npc playerCommand./npc remove/npc remove (npc)fancynpcs.command.npc.remove/npc server_command/npc server_command (npc) (add | set | remove | clear | list)fancynpcs.command.npc.server_command.(sub)/npc serverCommand./npc show_in_tab/npc show_in_tab (npc) [state]fancynpcs.command.npc.show_in_tab/npc showInTab.[state]argument is not specified./npc mirrorSkin/npc skincommand./npc skin/npc skin (npc) (@none | @mirror | name | url)fancynpcs.command.npc.skin@noneflag.@mirrorflag./npc teleport/npc teleport (npc)fancynpcs.command.npc.teleport/npc move_tocommand./npc turn_to_player/npc turn_to_player (npc) [state]fancynpcs.command.npc.turn_to_player/npc turnToPlayer.[state]argument is not specified./npc type/npc type (npc) (type)fancynpcs.command.npc.type