mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2026-03-29 12:02:46 +02:00
Allow commands to target offline players (#1022)
* Add targetRequirement annotation for Command * Added MTL lines for other langs * Fix TargetRequirement enum scoping * Adjust commands to targetRequirement system * Add translation message sugar to prevent future messages from being translated for wrong player * Temporarily disable offline targeting on /permission and /clear * Preliminary README cleanup * Readme commands cleanup * Clean up command table in README, including column shuffle Co-authored-by: AnimeGitB <AnimeGitB@bigblueball.in>
This commit is contained in:
@@ -17,5 +17,13 @@ public @interface Command {
|
||||
|
||||
String permissionTargeted() default "";
|
||||
|
||||
public enum TargetRequirement {
|
||||
NONE, // targetPlayer is not required
|
||||
OFFLINE, // targetPlayer must be offline
|
||||
PLAYER, // targetPlayer can be online or offline
|
||||
ONLINE // targetPlayer must be online
|
||||
}
|
||||
TargetRequirement targetRequirement() default TargetRequirement.ONLINE;
|
||||
|
||||
boolean threading() default false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user