Multiverse-Core

Multiverse-Core

6M Downloads

Anchors limited to use on Single World only

Malum-In-Se opened this issue · 8 comments

commented

Feature request

Feature description
I would like to be able to create an anchor that players can use on one world only. In other words, I would like to create an anchor to Town on a HomeWorld that player can use to go to a Town while in the HomeWorld, but not allow them to use it while on a different world, such as a Survival World.

How the feature is useful
A common MV scenario: A server allows players to port between worlds using only established portals (so allowing them world access but denying them teleport permissions). However, players can currently use an anchor to port between worlds bypassing denied teleport permissions, which allows them to cheat survival mode

In other words, if you give players permission to use an anchor to Town (anchor point) on a HomeWorld, they can use that anchor to port from a Survival World to the HomeWorld despite the fact they are denied teleport permission to port there. This allows them to cheat survival mode by using the anchor when they get in trouble, such as lost.

Would you please consider adding permissions to anchors to allow use (1) in a single world only, or (2) multiple worlds. Thank you very much in advance, a very big fan of your plugin.

commented

If you don't have any anchors in your survival world, then you can do this with LuckPerms since you can apply permissions uniquely per-world. For example, only give multiverse.teleport.self.a (the permission to teleport to anchors) on your HomeWorld.

commented

Thank you, that is exactly what I did, and it still sets the anchor globally rather than per world. I set one anchor on the HomeWorld, then gave users permission to use it (/lp group default permission set multiverse.teleport.self.a true). With this permission, players can use the anchor from other worlds to port to the HomeWorld. I didn't give them teleport permission (/mvtp Homeworld). Instead they have to use established portals. But, they are using the anchor to escape the survival world.

As a test, I removed the permission, and players can't use the anchor. I added back the permission, and they can use the anchor to port from any world. Albeit, a one-way trip, it's still being used as a survival world cheat more or less.

It appears to be an inconsistency between setting teleport permission per world and anchors only globally. I think anchors just need to be given the option of setting them "per world" or "globally."

Thank you for the quick response.

commented

I believe making anchors subordinate to teleport permissions might work.

If you denied teleport permissions to a world, then players couldn’t use anchors to bypass the permission setting.

If you gave teleport permission to another world, then there is no harm in letting them use either the teleport or anchor command to go there.

commented

What I might with LuckPerms was to only give the the anchor permission on the world they are allowed to use it. For example, either of these commands might work:

/lp group default permission set multiverse.teleport.self.a true world=allowed_world
/lp group default permission set multiverse.teleport.self.a false world=survival_world
commented

Just for clarification, did you copy the exact commands I suggested? The reason I'm asking is because I put placeholder world names instead of your actual world names (because I didn't know what your worlds were named). So if you didn't replace those, then it's expected they aren't going to work.

commented

Thank you nicegamer7. I tried what you suggested but the anchor command is still set globally, i.e., still allows players to teleport between worlds. LuckPerms accepted your suggested permissions, but did not change anything.

  1. What I did:
    I removed MV anchor permission (/lp group default permission set multiverse.teleport.self.a).
  2. Then I added what you suggested:
    /lp group default permission set multiverse.teleport.self.a true world=allowed_world
    /lp group default permission set multiverse.teleport.self.a false world=survival_world
  3. The result:
    No one could then use the anchor (/mvtp a:Town)
  4. I added back MV anchor permission (step 1), and then did what you suggested (step 2):
    But then players could use the anchor to port from SurvivalWorld to HomeWorld, again

I checked the Multiverse-Core or Multiverse-Portals server files, e.g., config, worlds, etc., but there isn't any files that I can edit to limit anchors for use on a a single world. I don't believe the answer lies there.

This is a love/hate conundrum for me, I love solving puzzles like this, but then I hate that I'm driven to spend all of my time trying to solve them.

I do thank you very much for your helping in trying to solve this, Malum_In_Se

commented

No problem! And same wishes to you :)

commented

OMG nicegamer7, it does work! You're my new best friend. I can't thank you enough so I'll just close with wishing you an awesome and healthy 2021.