Zrips / CMI

114 stars 97 forks source link

Permissions with Server Context on Velocity fail to register per-player #8463

Closed mkaulfers closed 7 months ago

mkaulfers commented 7 months ago

Description of Issue

Given the following setup.

Velocity Server -> Survival, Skyblock, Hardcore, Creative (Servers) (All have CMI)
Luck Perms 
- cmi.command.fly -> context = server: survival, skyblock
- cmi.command.fly.safelogin -> context = server: survival, skyblock 

some.permission.group.A
- cmi.command.fly = true
- cmi.command.fly.safeLogin = true

some.player
- some.permission.group.A

A player is unable to use /fly in the survival server while the server context exists. I'm required to make it global for it to work, otherwise they are given the You do not have permission! error.

Dev Notes

Version Information

--------------------------------------------------
CMI: 9.6.10.2 Unknown SqLite-> 9.6.10.4
CMILib: 1.4.5.0
Server: Paper(381) 1.20.4-R0.1-SNAPSHOT-
CMI economy: Disabled Vault: 1.7.3-b131 CMI Chat: Disabled
Modules -> 34 enabled 25 disabled: spawnerProximity, customMessages, tablist, moneyCheque, cmiPlaytime, bossBarCompass, votifier, cooldown, attachedCommands, spawnerCharge, interactiveCommands, namePlates, homeInteractions, portals, holograms, spawners, playerChatTag, schedule, worldLimitsElytra, worldLimits, ranks, firstJoinMessages, silentChest, warmup, totemBehavior
--------------------------------------------------

Errors

No response

Relevant Config Sections

BungeeCord:
  # You can disable bungeecord support entirely if you are exrperiencing issues with it
  # When setting this to false some features like public messages over bungee cord, private messages over bungeecord, portals over bungecoord and other features will stop working
  # Keep in mind that regular behavior of those features will remain intacted
  Enabled: true
  # When set to true player names from entire bungee network will be included into tab complete
  NamesInTabComplete: false
WorldLimits:
  # By setting to true fly and gamemode limitations per world will be aplied for player on world change if they dont have appropiate permission node
  Enabled: false
  # World list with default game modes
  # If player will have cmi.worldlimit.gamemode.bypass permission node, game mode wont be changed
  # Possible modes: creative, survival, adventure, spectator, 
  Gamemode:
  - testWorld:Survival
  # If player will have cmi.worldlimit.fly.bypass permission node, fly mode wont be changed
  Fly:
  - testWorld:False
  # If player will have cmi.worldlimit.elytra.bypass permission node, elytra flight will not be prevented
  # Players joining worlds with disable elytra flight will get their elytra dismounted if possible
  ElytraFlight:
  - worldName:False
  # When set to false, only players with cmi.worldlimit.fly.aboveroof can fly above world build limit
  FlyAboveRoof: true
  # When set to false, only players with cmi.worldlimit.fly.aboveroof can fly above world build limit
  FlyAboveRoofLimitations:
  - world-320
  - world_nether-128
  - world_the_end-256
  # If player will have cmi.worldlimit.god.bypass permission node, god mode wont be changed
  GodMode:
  - testWorld:False
  # Prevents particular entity spawn reasons in defined worlds. All possible reasons: NATURAL, JOCKEY, CHUNK_GEN, SPAWNER, EGG, SPAWNER_EGG, LIGHTNING, BUILD_SNOWMAN, BUILD_IRONGOLEM, BUILD_WITHER, VILLAGE_DEFENSE, VILLAGE_INVASION, BREEDING, SLIME_SPLIT, REINFORCEMENTS, NETHER_PORTAL, DISPENSE_EGG, INFECTION, CURED, OCELOT_BABY, SILVERFISH_BLOCK, MOUNT, TRAP, ENDER_PEARL, SHOULDER_ENTITY, DROWNED, SHEARED, EXPLOSION, RAID, PATROL, BEEHIVE, PIGLIN_ZOMBIFIED, SPELL, FROZEN, METAMORPHOSIS, DUPLICATION, COMMAND, CUSTOM, DEFAULT
  SpawnReasons:


### Relevant Plugins

_No response_

### Agreements

- [X] My server is supported by CMI.
- [X] My version of CMI at the time of this report is up to date.
- [X] I have searched the github and asked around before making this report.
mkaulfers commented 7 months ago

Discovered this was the result of an admin changing LP to use global instead of specifying the server.