Magic

Magic

190k Downloads

Wand overrides not overriding command string.

mibby opened this issue · 9 comments

commented

Magic dev 2913
Paper dev 226 (Spigot 1.14.4)

Spell

magichat:
    icon: spell_icon:138
    icon_disabled: spell_icon_disabled:138
    hidden: true
    icon_url: http://textures.minecraft.net/texture/2abee4fe341011b9a0ae2fb83644f695521fd4e4c6198fe23112f1acbf38369
    category: utility
    worth: 100
    actions:
      cast:
      - class: Delay
        delay: 1
      - class: Hat
      - class: Command
    effects:
      cast:
      -  class: EffectSingle
         location: target
         effectlib:
           class: SphereEffect
           iterations: 4
           particle: smoke_large
    parameters:
      target_self: true
      use_item: true
      reason: custom
      cooldown: 1000
      range: 1
      allow_max_range: true
      command: lp user @uuid permission set hat.example
      console: true

Wand

base_hat:
    mode: cast
    active_spell: magichat
    indestructible: true
    locked: true
    keep: true
    bound: true
    effect_color: '888888'
    spells:
        - magichat
hat_1:
    name: Hat 1
    icon: diamond_shovel:41
    inherit: base_hat
    overrides: magichat.command lp user @uuid permission set hat.1

When I try to use the hat_1 item, it does not grant the permission hat.1. It is granting the permission hat.example from the spell. Do command overrides not work?

Similarly, when typing /wand override while holding the wand, it cuts off after the first space of the command. It does not show the full command in-game.

commented

@NathanWolf Is there any other possible ways to get this to work and set permissions per wand? I really would like to avoid creating 400+ magichat spells all with different permissions assigned. :(

commented

Can you try doing it like this in the wand config?

    overrides:
    - magichat.command lp user @uuid permission set hat.1

I'm hoping maybe with the overrides in list format they'll parse correctly...

but if not, let me know and I'll test it out myself. It may be that it's something that needs fixing, in which case I'll do that ASAP.

commented

I tried multiple different formatting ways and even setting it in-game with the wand command, but couldn't get the override for commands to work whatsoever.

commented

Ok, I will take a look at it!

I know I’ve had issues with overrides that have spaces in them in the past, but I really thought I had fixed it all. I’m sure we can get it working- thanks for your patience!

commented

No problem, glad it can at least be looked at and hopefully fixed!

commented

The fix seems to be working wonderfully, thanks so much!

commented

@NathanWolf Is there anything you'd like me to do to help progress this issue? It's a bit time sensitive for my environment since it's my solution for redeeming legacy hats in a gui unlock system.

commented

No- I'll see if I can find some time this weekend, but no guarantees, sorry!