#Worldguard placeholders

1 messages · Page 1 of 1 (latest)

sly fog
#

Hi there, im trying to make a deluxemenu that shows the current entry message of a worldguard region. Is there place holder I can use for this?
Any help appreciated, thanks!

cursive token
#

-papi worldguard

#

It doesnt seem like. You can leave a suggestion on the github repo for the worldguard expansion

sly fog
cursive token
#

Sure

heady ruin
#

I'll try adding that later if no one does it before me

heady ruin
#

haven't tried yet but should work

sly fog
# heady ruin `%worldguard_region_flag_<flag>%`

Im not having much luck sorry. I'm trying like this. Can you see any obvious issue?
%worldguard_region_flag_greeting-title:test,1140,96,1220%
Ive also tried without the coords and cant get it to work

heady ruin
#

it's just %worldguard_region_flag_greeting-title%

#

ah I get it

#

welp, I'll double check I guess

#

what does it return right now? the placeholder itself or an empty string?

cursive token
#

@heady ruin rg[0] not rg[1]

final String[] rg = params.split("region_flag_");
            if (rg.length < 1) return null;

            Object flag = region.getFlags().keySet().stream().filter(f ->
                    f.getName().equalsIgnoreCase(rg[1])).map(region::getFlag).findAny().orElse(null);
heady ruin
#

why?

#

I'm splitting "region_flag_greeting-title" into "" and "greeting-title"

cursive token
heady ruin
#

I want the latter, not the empty string

cursive token
#

Ah shit. You are right, sry.

heady ruin
#

dw

sly fog
# heady ruin dw

Appreciate you guys looking at this. Would love if we could find a way to get this to work ❤️

heady ruin
#

does %worldguard_region_has_flag_greeting-title% work?

#

and did you try %worldguard_region_flag_greeting-title% without the location?

sly fog
heady ruin
#

does it return nothing or the placeholder itself?

sly fog
heady ruin
#

I should have the time to check tonight

#

though I don't see what could have possibly gone wrong

sly fog
heady ruin
#

So

#

I do see an issue lol

#

but it still works

#

are you sure you replaced the jar in your /plugins/PlaceholderAPI/expansions/ folder correctly?

#

maybe you forgot to remove the old one

#

hopefully it fixes your issue as well

#

wtf

#

the value in an optional object is in yet another optional object

#

why