Prevent an armor stand being placed.

  • 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 comminuty!

    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!

Status
Not open for further replies.

Naxxos

New Member
Apr 14, 2017
8
0
0
22
Hi all, I have been experiencing some trouble trying to prevent an armor stand being placed based on a permission granted to a player. here is the code:

code_language.skript:
on place of 416:
        player has permission "magicspells.cast.vampireconsume":
                cancel event
                message "&cvampires may not place this block."
                stop
 
Hi all, I have been experiencing some trouble trying to prevent an armor stand being placed based on a permission granted to a player. here is the code:

code_language.skript:
on place of 416:
        player has permission "magicspells.cast.vampireconsume":
                cancel event
                message "&cvampires may not place this block."
                stop
elaborate. what doesnt work? are there errors? btw you dont need the stop at the end and you shouldnt really use ids
 
The armor stand will just be placed,in other words literally nothing seems to happen.There is no message sent and no attempt to stop the block from being placed. The only error I get is one telling me data values may not be supported later on. Im using the ID's because I dont know where to find accurate names for the blocks/items.

This is said error:
[16:41:53 WARN]: [Skript] Using an ID instead of an alias is discouraged and will likely not be supported in future versions of Skript anymore. Please replace '416' with e.g. 'armor stand'. (Vampireblock.sk, line 211: on place of 416:')
 
The armor stand will just be placed,in other words literally nothing seems to happen.There is no message sent and no attempt to stop the block from being placed. The only error I get is one telling me data values may not be supported later on. Im using the ID's because I dont know where to find accurate names for the blocks/items.

This is said error:
[16:41:53 WARN]: [Skript] Using an ID instead of an alias is discouraged and will likely not be supported in future versions of Skript anymore. Please replace '416' with e.g. 'armor stand'. (Vampireblock.sk, line 211: on place of 416:')
The names are found in the alias file in the skript folder

As for the actual problem, i dont see anything wrong with the actual code so im guessing you just dont have the permission. Double check to make sure you spelled it right and you could also place a broadcast before the condition to make sure the event is firing
 
I have done as you asked, and it does not seem the event is triggering here is the code:

code_language.skript:
on place of armor stand:
        player has permission "magicspells.cast.vampireconsume":
                broadcast "Test"
                cancel event
                message "&cvampires may not place this item."

I tested this with the data value and the alias, neither event triggered and the alias gave me an error:
[17:02:42 ERROR]: can't understand this event: 'on place of armor stand' (vampireblock.sk, line 211: on place of armor stand:')
[17:02:42 INFO]: [Skript] Encountered 1 error while reloading vampireblock.sk!

I can confirm I have the permission.
Armor stand couldent be found in the alias folder aswell.
 
Last edited:
I have done as you asked, and it does not seem the event is triggering here is the code:

code_language.skript:
on place of armor stand:
        player has permission "magicspells.cast.vampireconsume":
                broadcast "Test"
                cancel event
                message "&cvampires may not place this item."

I tested this with the data value and the alias, neither event triggered and the alias gave me an error:
[17:02:42 ERROR]: can't understand this event: 'on place of armor stand' (vampireblock.sk, line 211: on place of armor stand:')
[17:02:42 INFO]: [Skript] Encountered 1 error while reloading vampireblock.sk!

I can confirm I have the permission.
Armor stand couldent be found in the alias folder aswell.
You didnt put the broadcast before the condition. Place it above the 'player has permission' line. also whats your skript and server version
 
Still nothing. Server version is 1.12, skript version is the latest version.

code:

code_language.skript:
on place of armour_stand:
        broadcast "&cfml"
        player has permission "magicspells.cast.vampireconsume":
                cancel event
                message "&cvampires may not place this item."
 
Because armor stands are an entity, not a block. Use on summon event.
 
On summon was not recongnized. Found out there is an addon for skript (mundosk) that allows for an on armor stand place event, the event now triggers and the broadcast goes through however it does not prevent the stand from being placed
code:

code_language.skript:
armor stand place:
        broadcast "&cfml"
        player has permission "magicspells.cast.vampireconsume":
                cancel event
                message "&cvampires may not place this item."
 
On summon was not recongnized. Found out there is an addon for skript (mundosk) that allows for an on armor stand place event, the event now triggers and the broadcast goes through however it does not prevent the stand from being placed
code:

code_language.skript:
armor stand place:
        broadcast "&cfml"
        player has permission "magicspells.cast.vampireconsume":
                cancel event
                message "&cvampires may not place this item."
its on spawn https://bensku.github.io/Skript/events.html#spawn
 
Status
Not open for further replies.