-
-
Notifications
You must be signed in to change notification settings - Fork 358
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
Town command blacklisting #4849
Conversation
if allowed, this can use the same event handler than the jail command blacklist, to avoid calling the handler twice per command |
After looking at the code I believe this does make sense, but I decided to have two separate handlers because they both do different stuff, similar to how there's multiple EventHandlers for the PlayerMoveEvent event. |
Note this is still missing the inside an town logic (which may be easily doable using TownyAPI) , I'll add it tomorrow since I don't have access to my computer rn. |
It seems the limited command feature is not working correctly, I'll try to find an fix and commit it so the PR can be marked as ready for review |
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.
Something has happened to the chinese, es-419 and french language files. They will need to be replaced with the Master branch and then have the new lines re-added.
src/com/palmergames/bukkit/towny/listeners/TownyPlayerListener.java
Outdated
Show resolved
Hide resolved
src/com/palmergames/bukkit/towny/listeners/TownyPlayerListener.java
Outdated
Show resolved
Hide resolved
src/com/palmergames/bukkit/towny/listeners/TownyPlayerListener.java
Outdated
Show resolved
Hide resolved
lang files should be ok now, i checked them out from the main repo and i re added the strings |
src/com/palmergames/bukkit/towny/listeners/TownyPlayerListener.java
Outdated
Show resolved
Hide resolved
src/com/palmergames/bukkit/towny/listeners/TownyPlayerListener.java
Outdated
Show resolved
Hide resolved
src/com/palmergames/bukkit/towny/listeners/TownyPlayerListener.java
Outdated
Show resolved
Hide resolved
I'm testing the latest commits once i'm able to use my laptop and will try to reply as soon as I can |
I'll give this a final rebase to resolve the conflict in TownySettings and then merge this tomorrow probably. |
- Requests from Warriorrrr are made. - Moves town-blocked commands above the personally-owned commands test to reduce the required returns later on. - Switches to the PermissionSource hasOwnTown and hasTownOwned permission tests.
- Allows blocking commands inside towns and limiting them to plots owned by the players only. - Useful for limiting sethome/home commands to plots owned by the players themselves and not someone else. - Admins and players with the towny.admin.town_commands.blacklist_bypass permission node will not be hindered. - Closes #4835. - New Config Option: global_town_settings.town_command_blacklisting.enabled - Default: false - Allows blocking commands inside towns through the town_blacklisted_commands setting. - This boolean allows you to disable this feature altogether if you don't need it. - New Config Option: global_town_settings.town_command_blacklisting.town_blacklisted_commands - Default: somecommandhere,othercommandhere - Comma separated list of commands which cannot be run inside of any town. - New Config Option: global_town_settings.town_command_blacklisting.player_owned_plot_limited_commands - Default : sethome,home - This allows the usage of blacklisted commands only in plots personally-owned by the player. - Players with the towny.claimed.townowned.* permission node will be able to run these commands inside of town-owned land. This would include mayors, assistants and possibly a builder rank. - Players with the towny.claimed.owntown.* permission node (given to mayors/assistants usually, will also not be limited by this command blacklist. - New Permission Node: towny.admin.town_commands.blacklist_bypass - Child Node of towny.admin - Allows admins to not be restricted by either command-blocking lists. - Fix entity-vs-entity combat always being allowed, courtesy of Warriorrrr with PR #4893. - Update korean.yml, courtesy of yumjunstar with PR #4889.
Description:
Allows blocking commands while inside a town.
New Nodes/Commands/ConfigOptions:
CONFIG OPTIONS
PERM NODES
Relevant Towny Issue ticket:
Closes #4835
By making this pull request, I represent that I have the right to waive copyright and related rights to my contribution, and agree that all copyright and related rights in my contributions are waived, and I acknowledge that the TownyAdvanced organization has the copyright to use and modify my contribution under the Towny License for perpetuity.