
A simple PlaceholderAPI expansion for PlotSquared that checks if a player is standing on their own plot.
A lightweight and efficient PlaceholderAPI expansion for PlotSquared that provides real-time plot ownership detection and flag checking. This expansion allows server administrators and plugin developers to check whether a player is currently standing on their own plot and query plot flags, enabling dynamic content, conditional permissions, and enhanced gameplay mechanics.
This expansion adds powerful placeholders that return true or false based on plot ownership and flag status. This is particularly useful for:
| Placeholder | Description | Return Value | Use Case |
|---|---|---|---|
%plotowner_on_own_plot% |
Checks if the player is standing on their own plot as the owner | true or false |
Perfect for conditional logic in any plugin that supports PlaceholderAPI |
%plotowner_on_own_plot_<flag>% |
Checks if a specific flag is set on the current plot | true or false |
Check plot flags like PVP, FLY, USE, etc. |
Important Note: The ownership placeholder specifically checks for plot ownership. Players who are only trusted or added as members will receive false.
%plotowner_on_own_plot_pvp% - Returns true if the PVP flag is set on the current plot%plotowner_on_own_plot_fly% - Returns true if the FLY flag is set on the current plot%plotowner_on_own_plot_use% - Returns true if the USE flag is set on the current plot%plotowner_on_own_plot_explosion% - Returns true if the EXPLOSION flag is set on the current plotDownload the latest release JAR file
Place the downloaded JAR file into your server's PlaceholderAPI expansions folder:
plugins/PlaceholderAPI/expansions/
Important: Do NOT place this in the main plugins folder. This is an expansion, not a standalone plugin.
Run the following command in your server console or in-game:
/papi reload
Check if the expansion loaded successfully:
/papi list
You should see plotowner in the list of loaded expansions.
Test the placeholders while standing on your plot:
/papi parse me %plotowner_on_own_plot%
/papi parse me %plotowner_on_own_plot_pvp%
You should see true if you're on your own plot, or false if you're not.
Show a special item only when players are on their own plot:
plot_settings_item:
material: COMPARATOR
slot: 13
display_name: "&6&lPlot Settings"
lore:
- "&7Click to configure your plot"
- "&7Status: &a%plotowner_on_own_plot%"
view_requirement:
requirements:
must_be_on_plot:
type: string equals
input: "%plotowner_on_own_plot%"
output: "true"
left_click_commands:
- "[player] plot flag"
Display plot ownership and flag status on your scoreboard:
board:
title:
text:
- "&6&lMy Server"
lines:
line1:
text: "&7━━━━━━━━━━━━━━━"
line2:
text: "&ePlot Owner: &f%plotowner_on_own_plot%"
line3:
text: "&ePVP Enabled: &f%plotowner_on_own_plot_pvp%"
line4:
text: "&eFlight: &f%plotowner_on_own_plot_fly%"
line5:
text: "&eLocation: &f%player_world%"
line6:
text: "&7━━━━━━━━━━━━━━━"
Execute commands based on plot flags:
pvp_zone_enter:
type: player_move
conditions:
- "%plotowner_on_own_plot_pvp% == true"
actions:
default:
- "message: &c&lYou entered a PVP zone!"
- "sound: ENTITY_ENDER_DRAGON_GROWL"
The expansion uses the official PlotSquared API to:
true or false accordinglyThis process is highly optimized and causes minimal performance impact, even with hundreds of players online.
If you want to compile the expansion yourself:
# Clone the repository
git clone https://github.com/AlphaBlock4k/PlotSquared-PlaceholderExpansion.git
cd PlotSquared-PlaceholderExpansion
# Build with Gradle
gradle clean build
# Or use the Gradle wrapper
./gradlew clean build # Linux/Mac
gradlew.bat clean build # Windows
The compiled JAR will be located in build/libs/Expansion-PlotOwner-1.0.1.jar
This expansion works seamlessly with any plugin that supports PlaceholderAPI, including:
Q: Why does it show "false" when I'm trusted on a plot?
A: This expansion specifically checks for plot ownership. Only the plot owner will receive true. Trusted members and added players will receive false.
Q: Does this work with merged plots?
A: Yes! If you own a merged plot and stand anywhere on it, the placeholder will return true.
Q: Can I use this for road detection?
A: Yes! If the placeholder returns false and the player is in a plot world, they're either on a road or on someone else's plot.
Q: What's the performance impact?
A: Minimal. The expansion uses efficient PlotSquared API calls and includes error handling to prevent lag.
Q: Why is the identifier "plotowner" and not "plotsquared"?
A: PlaceholderAPI already has a built-in expansion with the identifier "plotsquared". To avoid conflicts, this expansion uses "plotowner".
Q: What happens if I delete the expansion and reload?
A: The expansion will be properly unregistered and removed from memory. This was fixed in version 1.0.1.
Q: Can I check any PlotSquared flag?
A: Yes! You can check any flag that PlotSquared supports. Just use %plotowner_on_own_plot_<flagname>% with the flag's name.
Q: What if a flag doesn't exist or isn't set?
A: The placeholder will return false if the flag doesn't exist or isn't set on the plot.
plugins/PlaceholderAPI/expansions//papi reload/papi list/papi parse me %plotowner_on_own_plot%plotowner not plotsquared/plot info to verify ownership/plot flag listplugins/PlaceholderAPI/expansions//papi reload/papi list that it's no longer listedAlphaBlock4k
If you find this expansion useful, please consider:
%plotowner_on_own_plot_<flag>%Made with ❤️ for the Minecraft community