BentoBoxWorld / BentoBox

Expandable Minecraft server plugin for island-type games like SkyBlock or AcidIsland.
https://bentobox.world
Eclipse Public License 2.0
333 stars 137 forks source link

Placeholder: %bskyblock_onisland_<player>% #2436

Closed postyizhan closed 2 months ago

postyizhan commented 2 months ago

Description

If this player is on my island, return true If not present, return false

Placeholder: %bskyblock_onisland_<player>%

tastybento commented 2 months ago

I have a few clarifications/questions for you:

  1. What are you using this for? If it's returning true/false, then I assume it's going into some kind of script or program? If so, there may be a better way of doing this than using placeholders
  2. The placeholder will only exist when the player is online - it'll be registered when they join the server, and unregistered when they leave to prevent potentially 1000's of named placeholders taking up memory. Does that work for you?
  3. If you query a player whose not online or with an unknown name, the placeholder returned will be %bskyblock_onisland_<player>% - okay?
  4. As players can have more than one island in the same game mode, it'll reply true if the player is on any of those - okay?
postyizhan commented 2 months ago

Thank you for your reply

  1. Yes, this will make it easier for me to use a scripting language( https://plugins.ptms.ink/function/kether
  2. Sure, I just need to determine the online players
  3. Of course
  4. of course I want to create a ban menu that allows players to click on the player's head to prohibit them from entering the island. I just need a way to determine if a player is on my island
tastybento commented 2 months ago

Okay, this is done in the SNAPSHOT.