-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
commands and translations overhaul #105
Merged
OliverSchlueter
merged 100 commits into
FancyMcPlugins:main
from
Grabsky:feature/commands-v2
May 23, 2024
Merged
commands and translations overhaul #105
OliverSchlueter
merged 100 commits into
FancyMcPlugins:main
from
Grabsky:feature/commands-v2
May 23, 2024
Conversation
This file contains 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
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.
Grabsky
force-pushed
the
feature/commands-v2
branch
from
May 20, 2024 16:35
ee9ea7d
to
80903ac
Compare
OliverSchlueter
approved these changes
May 23, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
equipment
sub-command family.TO-DO
.@Default
annotation not working on flagsLocation argument suggestions not working properly.TO-DO (OPTIONAL, NON-BLOCKING)
ExceptionHandlerRegistration
forLocationParser.LocationParseException
with a regularExceptionHandler
. Depends on Incendo/cloud-minecraft (#70).CHANGLOG / REFERENCE
Important / Breaking Changes
fancynpcs.command.(command).(sub)
format. New permissions are listed below.snake_case
instead oflowerCamelCase
. These sub-commands are:interactionCooldown
➞interaction_cooldown
turnToPlayer
➞turn_to_player
showInTab
➞show_in_tab
serverCommand
➞server_command
playerCommand
➞player_command
FancyNpcs/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_flags
fancynpcs.command.fancynpcs.feature_flags
/fancynpcs featureFlags
./fancynpcs reload
/fancynpcs reload
fancynpcs.command.fancynpcs.reload
/fancynpcs save
/fancynpcs save
fancynpcs.command.fancynpcs.save
/fancynpcs version
/fancynpcs version
fancynpcs.command.fancynpcs.version
/npc attribute
/npc attribute (npc) (set | list)
fancynpcs.command.npc.attribute.(sub)
list
sub-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.copy
A-Z a-z 0-9 _ - /
characters./npc create
/npc create (name) [--position (x y z)] [--world (world)] [--type (type)]
fancynpcs.command.npc.create
A-Z a-z 0-9 _ - /
characters./npc displayname
/npc displayname (npc) (@none | name)
fancynpcs.command.npc.displayname
@none
instead of<empty>
./npc equipment
/npc equipment (npc) (set | clear | list)
fancynpcs.command.npc.equipment.(sub)
clear
sub-command`.list
sub-command.@none
,@hand
or valid item type as an argument./npc fix
/npc fix (npc)
fancynpcs.command.npc.fix
/npc glowingColor
/npc glowing
command./npc glowing
/npc glowing (npc) [disabled | color]
fancynpcs.command.npc.glowing
true
orfalse
, acceptsdisabled
or 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:ms
s
min
h
d
mo
y
/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)
@none
instead 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-direction
presence 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.nearby
list
sub-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 skin
command./npc skin
/npc skin (npc) (@none | @mirror | name | url)
fancynpcs.command.npc.skin
@none
flag.@mirror
flag./npc teleport
/npc teleport (npc)
fancynpcs.command.npc.teleport
/npc move_to
command./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