Add permission to disallow spectators teleporting to players - #1729
Conversation
This comment was marked as spam.
This comment was marked as spam.
|
Please add a configuration option that would enable the requirement of this permission. We avoid making any changes that would automatically change any behavior from Paper. |
|
I'll update the code. Does "spectator-teleport-permission" sound like an appropriate name for the configuration setting? |
|
"require-spectator-teleport-permission" sounds better to understand in my opinion |
This is what I would go with as well. |
|
I've added a configuration entry for the permission node. It is set to "false" by default. Are any other changes needed? I apologise for the delay as well. I have a lot going on in real life. |
|
I'm going to update the patches to make them work with Java Edition 26.2. This might take a bit. |
…leport-node.patch
…n-entry-for-spectatetp-permission.patch
…ectatetp-setting.patch
granny
left a comment
There was a problem hiding this comment.
Not a bad idea, just some requested changes.
If you register the permission in the PurpurPermissions class in the registerPermissions() method as default true, you can avoid needing to specify a config option for this permission.
Please include a PR to PurpurDocs in the permissions page, and for the config option if we decide to keep it.
|
I updated the code. Before I submit a pull request to the PurpurDocs repository, I'd like to ask if this is what you're looking for? |
pretty sure granny meant to modify the existing patch instead of adding another one on top of it that "makes code less noisy" |
|
Yeah those patches are really wrong. You should update the current patch you did, the 0022- patch and make it less noisy (simpler and shorter) |
|
Is this better? |
|
The comments are updated now. |
granny
left a comment
There was a problem hiding this comment.
This PR has been sitting around long enough that I feel bad continuing to leave reviews to make this more maintainable. I've gone ahead and made my own changes and separated them into multiple commits to hopefully help guide you in any future PRs you make to this project. Mickey42302/Purpur@5e4d1b3...cd02f60
Thank you for this PR! I'll document the new permission in PurpurDocs myself as well.
I would like to suggest the addition of a "minecraft.spectatetp" permission node. It would allow for control over whether or not people can teleport to others in Spectator mode.
This idea originates from BasicLandMC: https://github.com/Basic-Land/BasicLandMC/blob/6936acca0bd195f762e9c09e8899d382eacd0c12/basiclandmc-server/minecraft-patches/sources/net/minecraft/server/network/ServerGamePacketListenerImpl.java.patch