Issue with world guard

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Injoyed_

Member
Apr 6, 2025
17
0
1
Hello I need help with this armor stand code that I made:

on damage of armor stand:
if victim's display name is "swrawsteak":
if attacker has wooden sword:
remove wooden sword from attacker
give or drop emerald named "&a&lMONEY" with lore "A Currency Used For%nl% This Civilisation" to attacker
send "PLS WORK" to attacker

Everything works fine but when an player is not operator it says "Sorry, but you can't change that here." I tried everything with world guard is there a way I can bypass it with skript? maybe to override it???

I am using this version of skript: 2.10.2
this version of worldguard: 7.3.1.0
This version of minecraft: 1.21.4
 
Try to use not armorstand because you aren't hitting it I think you are placing sword in his hand
 
get the region the item stand is in, most likely default, and set mob-damage to allow.
 
does it work without world guard? and if not set damage-animals to true, or try block breaking and use
Code:
on block break:
    cansel event
 
I reread it and put it through the parser and made a few changes, hope this helps
Code:
on damage of armor stand:
    if victim's display name is "swrawsteak":
        if attacker is a player:
            if attacker's tool is a wooden sword:
                remove 1 wooden sword from attacker
                give attacker emerald named "&a&lMONEY" with lore "A Currency Used For%nl%This Civilisation"
                send "&aPLS WORK" to attacker
 
I reread it and put it through the parser and made a few changes, hope this helps
Code:
on damage of armor stand:
    if victim's display name is "swrawsteak":
        if attacker is a player:
            if attacker's tool is a wooden sword:
                remove 1 wooden sword from attacker
                give attacker emerald named "&a&lMONEY" with lore "A Currency Used For%nl%This Civilisation"
                send "&aPLS WORK" to attacker
Ty but the issue I am having is with worldguard giving me this message "Hey! Sorry, but you can't change that here." I tried doing the flags like damage allow breaking block everything but it still doesnt work I was hoping I could bypass it with skript or if someone knew a way to fix this issue.
 
i have cannot figure out what the origin of the issue is unless you send a screen shot of the error message and the settings for the regions that the armor stand is in.
 
i have cannot figure out what the origin of the issue is unless you send a screen shot of the error message and the settings for the regions that the armor stand is in.
the flags are for the region: (use deny, interact allow, damage animals allow, pvp allow, mob damage allow) And the screenshot of the error:
1744053512370.png

It only appears when I hit the armor stand it will never let me hit the armor stand to do the code I written
 
try setting use to allow, and if it doesn't work I'll hop on my server and do some experiments
 
I figured it out go into the config.yaml file and set

Code:
protection:
  item-frame:
    disable-interaction: false
    entity-protection:
        deny-spawn:
          - armor_stand
-everything else-
 
I figured it out go into the config.yaml file and set

Code:
protection:
  item-frame:
    disable-interaction: false
    entity-protection:
        deny-spawn:
          - armor_stand
-everything else-
Where do I put this? I mean I looked in my config.yaml and tried to put it all in my protection however it compeletly breaks everything when I do that so I ask again where do I put this code? (also ty very much for helping me)
 
I copy exactly what you did however everything broke people were allowed to break blocks all items were broken and yes the armor stand was hittable but thats due to world guard breaking here the 2 before and after of what I did
 

Attachments

  • Screenshot 2025-04-08 113032.png
    Screenshot 2025-04-08 113032.png
    19 KB · Views: 155
  • Screenshot 2025-04-08 112847.png
    Screenshot 2025-04-08 112847.png
    11.7 KB · Views: 143
hmm I'll do some more tests
I sorta fixed it all I did was just make everything the armor stands were in __global__ and added some flags to prevent breaking and placing but now the issue I am having is when I hit the armor stand it can just break if hit too many times making it invenable doesnt work that makes it so the damage doesnt work either :emoji_frowning: