Cannot test if people are GP Owners or Members
I can't seem to successfully check if a player is a member or an owner of a Grief Prevention region.
# On placing of soft blocks, notify players about the /pvp menu and soft blocks
on place:
if event-block is cobblestone:
set {_region} to "%region at player%"
broadcast "&cDebug: &fStage 1 Pass"
if player is member of {_region}:
broadcast "&cDebug: &fStage 2 Pass"
message "&cNote: &7You have placed cobblestone which is a soft block. This can be destroyed by other players when you are sieged. Type &5/pvp &7to see the other soft blocks and build a more secure claim!"
Debug Stage 2 Pass never fires.
Another update on this, the issue is that Skript cannot test all the players who are able to build in Grief Prevention claims other than the owner of the claim itself.
So even if you /trust someone in your GP claim, Skript cannot recognise them as members.
on region enter:
wait 2 seconds
set {_rg.can.build} to "%region at player%"
broadcast "&cDebug: &fStage 1 Pass"
broadcast "&cDebug: &fRegion: %{_rg.can.build}%"
broadcast "&cDebug: &f%all members of the region%"
For example, there is another person I have trusted in this claim but the Debug message which broadcasts all the members of the region, just broadcasts the owner.
@whoshenry This may be a stupid question, but I've never used GriefPrevention; does /trusting someone actually properly add them to the region as a WorldGuard member? i.e. If you do /rg info <region> after they've been trusted, does the newly-trusted player show up on the region's member list? I'm just wondering if perhaps GP uses some other method of interfacing with or bypassing WG to allow the trusted people to use the region instead of just adding them as a region member directly.
I only ask because if the trusted player is showing up on the members list but Skript isn't detecting it, then this is a bug, but if not then it's more of an oversight due to how GP handles things which would likely be better labelled as an enhancement. It would also help guide Bensku on how to fix it.
Grief Prevention doesn't create World Guard regions, the regions are handled by the plugin itself, so when you /trust someone it will allow the player to build in your region, same as when you do /rg addmember <region> <player> for World Guard.
Grief Prevention is listed as a supported region plugin in the Skript documentation, so shouldn't it be able to detect who the trusted players are?
Ah my bad, goes to show how much I know about GriefPrevention. You're correct, since it's listed as supported it should be able to detect members correctly.
Could you send your versions for me? GriefPrevention included. If you're not on the latest version (dev32), verify there first on a test server. Also if anyone else sees this and can verify they're having the same issue, it would be helpful (I'm at work and regardless don't have a GP setup at home or experience using it).
Grief Prevention - 16.7.1 Skript - Dev 32 Spigot - CraftBukkit version git-Spigot-93e20b3-31d3159 (MC: 1.12.2)
Thanks!
Probably a related issue but with another type of script.
# On placing of soft blocks, notify players about the /pvp menu and soft blocks
on place:
broadcast "&cDebug: &fStage 1 Pass"
if event-block is cobblestone:
broadcast "&cDebug: &fStage 2 Pass"
set {_region} to "%region at event-location%"
broadcast "&cDebug: &fRegion: %{_region}%"
if player can build at {_region}:
broadcast "&cDebug: &fStage 3 Pass"
play BLOCK NOTE XYLOPHONE at player with pitch 0.3
message "&6&lNote: &7You have placed cobblestone which is a &f&lsoft block&f. This can be destroyed by other players when you are sieged. Type &5/pvp &fto see the other soft blocks and build a more secure claim!"
Even though I am the owner of the region, Debug: Stage 3 Pass never fires.
I'm just going thru old issues, trying to clear things up.
The issue here is you are checking the owner of a string
In this test code
command /test:
trigger:
set {_r} to "%region at player%"
send "&aOwner String: %owner of {_r}%"
set {_r::*} to region at player
send "&6Owner Region Var: %owner of {_r::1}%"
send "&bOwner Region at: %owner of region at player%"
This is the outcome we get.

The reason it returns none is because you are basically doing this
owner of "some string"
As for the members part, I did test that, and as you stated, it does not properly show the members of the region:
I will take a look into that issue.
this is still an issue
this is still an issue
Debugged and found out that the issue is the Region ClassInfo is getting the whole expression line thrown through the parse method for some reason. https://github.com/SkriptLang/Skript/blob/d09320866fa15bd6f2fc77b13f3e0cfd2c46ef36/src/main/java/ch/njol/skript/hooks/regions/GriefPreventionHook.java#L248
So it's attempting to parse %owner of "0"% as the String input.
Parser issue. Probably something to do with the fact that Regions can have quotes.
Transferring back as there are not current plans to support other region plugins as spinoff addons. We can see what can be done about support here.
I don't think we should continue support for other region plugins in Skript itself