Working As Intended Bug: [Artifact] Custom Enchants Ignoring WorldGuard pvp deny

Discussion in 'Bug Reports' started by cerberus402, Oct 30, 2019.

  1. cerberus402

    cerberus402 New Member
    Supporter

    Joined:
    Dec 4, 2018
    Messages:
    3
    Likes Received:
    0
    Enter a brief description of what is broken [Artifact] Custom Enchants Ignoring WorldGuard pvp deny

    What version of Minecraft are you using? 1.14,
    1.13 R2

    What server jar are you using? Spigot

    What is this a bug report for? Artifacts

    What version of the plugin are you using? Artifacts dev build 236; MythicMobs dev build 2990

    Describe the bug. Be as specific as possible, images or short gifs/videos are welcome but save configuration files for later sections. Write a whole paragraph if needed, help us bug testers replicate your issue!
    I have a bow with an enchantment called Venomous (basically the example enchantment) that applies wither ~onBowHit. Shooting another player on my server while they are in a pvp deny worldguard region will cause the arrow to bounce off, as it should, but the ~onBowHit skills will still be applied. This kinda of breaks pvp deny since you could spam arrows and keep reapplying the wither effect.

    I tested it with the same enchant on a sword with the ~onAttack trigger and it does that same. The sword swing is blocked, but the wither effect will still pass through the pvp protection.

    I took a gif with gyazo using the bow with the venomous enchantment:
    https://gyazo.com/b09fdb1642c4c2daf22dce30173d8e7d

    As you can see, there is no knockback from the arrow and it bounces off, as you would expect. A message in chat comes up to say pvp is not allowed here... but the withering effect passes through and damages the players where they should not be damaged.

    I tested this in both spigot 1.14.4 and spigot 1.13.2

    Example Configurations
    Code:
    VENOMOUS:
      Display: 'Venomous'
      MinLevel: 1
      MaxLevel: 1
      ItemType: WEAPON
      Options:
        Cursed: FALSE
        Treasure: FALSE
        ShowInLore: FALSE
        LevelAsPower: FALSE
      EnchantableItems:
      - BOW
      ConflictingEnchants:
      - FLAME
      Skills:
      - effect:particleline{particle=slime;amount=1;fromOrigin=true} @target ~onShoot
      - effect:sound{s=entity.skeleton.shoot;volume=1.0;pitch=.01} @SelfLocation ~onShoot
      - effect:particles{p=slime;amount=15;speed=.5;yOffset=1;hS=0.5;vS=0.1} @target ~onBowHit
      - effect:sound{s=entity.elder_guardian.hurt_land;volume=1.0;pitch=.01} @target ~onBowHit
      - potion{type=SLOW;d=100;level=1} @target ~onBowHit
      - potion{type=WITHER;d=100;level=1} @target ~onBowHit
     
    #1
  2. Roger M

    Roger M Member
    Premium Supporter Supporter

    Joined:
    May 13, 2016
    Messages:
    209
    Likes Received:
    17
    You will need to use conditional skills citing the disallowed worldguard regions. Otherwise several cosmetic items made using Artifacts would not work, even though they would be fine for pvp areas.
     
    #2
  3. cerberus402

    cerberus402 New Member
    Supporter

    Joined:
    Dec 4, 2018
    Messages:
    3
    Likes Received:
    0
    Is there no other way than that? I have potentially hundreds of regions the way my server is set up (has lots of cities located in vastly different areas).

    Nevertheless I tried your suggestion though, and the skill will still activate even in a region it should not.
    Code:
    VENOMOUS:
      Display: 'Venomous'
      MinLevel: 1
      MaxLevel: 1
      ItemType: WEAPON
      Options:
        Cursed: FALSE
        Treasure: FALSE
        ShowInLore: FALSE
        LevelAsPower: FALSE
      EnchantableItems:
      - BOW
      ConflictingEnchants:
      - FLAME
      Conditions:
      - notinregion{r=spawn} true
      Skills:
      - effect:particleline{particle=slime;amount=1;fromOrigin=true} @target ~onShoot
      - effect:sound{s=entity.skeleton.shoot;volume=1.0;pitch=.01} @SelfLocation ~onShoot
      - effect:particles{p=slime;amount=15;speed=.5;yOffset=1;hS=0.5;vS=0.1} @target ~onBowHit
      - effect:sound{s=entity.elder_guardian.hurt_land;volume=1.0;pitch=.01} @target ~onBowHit
      - potion{type=SLOW;d=100;level=1} @target ~onBowHit
      - potion{type=WITHER;d=100;level=1} @target ~onBowHit
    
    I made a region called spawn with a priority of 2 (global is 1) so its a higher priority. Skill will still activate even though by the condition, it shouldn't.

    Am I doing something severely wrong? If it works for you can you post your enchantment?
     
    #3
  4. Roger M

    Roger M Member
    Premium Supporter Supporter

    Joined:
    May 13, 2016
    Messages:
    209
    Likes Received:
    17
    I haven’t played with enchants before, but try making all of the skills from the enchant a single metaskill, and put the condition on that.
     
    #4

Share This Page