-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
Add a new command "nostamina" #877
Conversation
Why does English appear in zh-cn.json? |
Sorry, I used the old version of ZH CN when submitting JSON, resulting in content mismatch. I'm updating to the new version. |
The stamina of all players is controlled in the config, and the stamina of a single player is controlled by the command. I wonder if it is feasible? |
I think we may need to continue our research now. I need further tests. |
Done |
Don't test for the time being. I'm resetting. |
goooood,love it!!! |
|
||
@Command(label = "nostamina", usage = "nostamina [on|off]", permission = "player.nostamina", permissionTargeted = "player.nostamina.others", description = "commands.nostamina.description") | ||
public final class NoStaminaCommand implements CommandHandler { | ||
public static boolean StaminaState = false; |
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.
public static boolean StaminaState = false;
should be write inside player class instead of the command
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.
OK. I‘m busy now.I will fix it.Thanks.
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.
I have fixed it.But I eat out now and need to go back and update later.be sorry.
All the work is ready. The new version has finished disabling the physical strength of a single player. |
@@ -753,7 +754,14 @@ public void addShopLimit(int goodsId, int boughtCount, int nextRefreshTime) { | |||
} | |||
this.save(); | |||
} | |||
|
|||
public boolean getstamina() { |
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.
Please use proper camelcase naming convention. (Ex. getstamina -> getStamina) Other than that, everything looks good.
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.
Done.Thanks.
Fix an existing language expression error.
* Add a new command " nostamina\ * Fix * Fix 2 * Renamed some names. * Update zh-CN.json Fix an existing language expression error.
Description
Please carefully read the Contributing note and Code of conduct before making any pull requests.
And, Do not make a pull request to merge into stable unless it is a hotfix. Use the development branch instead.
Issues fixed by this PR
I added a new command "nostamina". The function of this command allows players to maintain maximum endurance through commands. I understand that unlimited endurance can be set in the configuration file in the new version, but I think it will be more convenient for players to operate unlimited endurance with instructions. This part of the code imitates godmodecommand Written in Java.
(Baidu translation is used)
Type of changes
Checklist: