Zrips / CMI

117 stars 99 forks source link

Combat mode command blacklist not working #9057

Closed xmorose closed 2 months ago

xmorose commented 2 months ago

Description of Issue

When having combatmode enabled, the blacklist of the combatmode commands doesnt do anything. Players can still use all of the commands (and commands outside of the defined scope) when in combatmode.

Version Information

[15:28:37 INFO]: --------------------------------------------------
[15:28:37 INFO]: CMI: 9.7.5.3 SqLite
[15:28:37 INFO]: CMILib: 1.5.1.1 
[15:28:37 INFO]: Server: Paper(16281) 1.21.1-R0.1-SNAPSHOT+
[15:28:37 INFO]: CMI economy: Enabled Vault: 1.7.3-CMI CMI Chat: Enabled 
[15:28:37 INFO]: Modules -> 58 enabled 8 disabled: spawnerProximity, deathMessages, tablist, votifier, headDrop, spawners, spawnerCharge, dynamicSigns
[15:28:37 INFO]: --------------------------------------------------

Errors

No response

Relevant Config Sections

Combat:
  # Defines combat timer to be used in particular features
  Timer: 15
  # When enabled we will allow for players to be damaged in safe zone if they are tagged for pvp
  safeZoneDamage: false
  # If set to true, then attacked player will be included into combat mode even if he doesnt fight back
  # If set to false then only attacker will be marked for pvp mode
  IncludeVictim: true
  Player:
    # If set to true, then player who gets placed into combat mode will get its fly mode disabled
    # This will disable players fly mode which will result in player dropping down and will disable option to start flying
    # This can be bypassed by player performing fly command if he has access to it and commands durring combat are not blocked
    # Can be bypassed with cmi.pvp.PFlyBypass permission node
    DisableFlight: true
    # If set to true player whose fly mode got disabled will not suffer fall damage, once
    DisableFallDamage: false
    # When set to true player will see boss bar message indicating how long until combat mode ends
    # This only applies for pvp type combat
    ShowBossBar: true
    # When enabled we will show damage numbers in a form of holograms when damaging players
    ShowDamageNumbers: false
    DamageNumbersFormat: '&c⚔[damage]'
    # Prevents damage from players with god mode enabled
    # Can be bypassed with cmi.pvp.godBypass permission node
    noGodDamage: false
    # Informs player that he cant damage players while in god mode
    noGodDamageInform: false
    # When set to true players will be only able to use commands defined in the list
    # This only applies for pvp type combat
    BlockCommands: true
    AllowedCommands:
    - spawn
    - warp
    - home
    - tpa
    - tpahere
    - tpo
    - homes
    - wild
    - warps
    - sethome
    - resourceworld
    - rt
    # When set to true AllowedCommands become black list which will define which commands player cant use
    MakeBlackList: true
  Mob:
    # If set to true, then player who gets placed into combat mode will get its fly mode disabled
    # Can be bypassed with cmi.pvp.MFlyBypass permission node
    DisableFlight: true
    # If set to true player whose fly mode got disabled will not suffer fall damage, once
    DisableFallDamage: false
    # When set to true player will see boss bar message indicating how long until combat mode ends
    # This only applies for pve type combat
    ShowBossBar: true
    # When enabled we will include damage from environmental damage into mob combat timer
    # This can include damage from cactus, magma blocks, suffocation, burning, fall damage and similar
    IncludeEnvironment: false
    # When enabled we will show damage numbers in a form of holograms when damaging mobs
    ShowDamageNumbers: false
    DamageNumbersFormat: '&c❤[damage]'
    # Prevents damage from players with god mode enabled
    # Can be bypassed with cmi.pve.godBypass permission node
    noGodDamage: false
    # Informs player that he cant damage mobs while in god mode
    noGodDamageInform: false
    # When set to true players will be only able to use commands defined in the list
    # This only applies for pve type combat
    BlockCommands: true
    AllowedCommands:
    - spawn
    - warp
    - home
    - tpa
    - tpahere
    - tpo
    - homes
    - wild
    - warps
    - sethome
    - resourceworld
    - rt
    # When set to true AllowedCommands become black list which will define which commands player cant use
    MakeBlackList: true

Relevant Plugins

No response

Agreements

Zrips commented 2 months ago

If you are using base CMI commands aliases, you will need to switch to full command, for example - home should be - cmi home for it to be properly detected as blocked. This is only for base CMI commands which have full /cmi [command]

xmorose commented 2 months ago

Hiho, i have tried cmi home and home (and both at the same time) and the command still goes through.