Create a Minecraft Java Edition Paper plugin named PosTP.
The plugin is a teleport and hub management plugin for Minecraft 1.21.x.
The plugin must work with Java 21 and Paper 1.21.x.
================================================== MAIN IDEA ==================================================
PosTP allows players to open a teleport INVENTORY GUI using:
/postp
The INVENTORY GUI must automatically detect which world the player is currently in.
The player should only see teleport locations that belong to that current world.
For example:
Survival world:
Lifesteal world:
If the player is currently in Survival, the INVENTORY GUI must only show Survival locations.
If the player is in Lifesteal, only Lifesteal locations should appear.
================================================== NPC SUPPORT ==================================================
PosTP must NOT have its own NPC system.
It must NOT depend on any specific NPC plugin.
Any NPC plugin can be used.
The NPC only needs to execute:
/postp
when a player clicks it.
For example, a Citizens NPC, FancyNpcs NPC, or any other NPC can execute /postp.
PosTP receives the command and opens the teleport INVENTORY GUI.
================================================== SPAWN SETTING ==================================================
An admin can stand at a location and create a teleport point using:
/postpset <name> add
Example:
/postpset Spawn1 add /postpset Market add /postpset PvPArena add
The exact location where the admin is standing must be saved.
Save:
- World
- Coordinates
- Yaw
- Pitch
- Biome
Each teleport point belongs to the world where it was created.
Admins can also:
/postpset <name> remove
/postpset list
/postp reload
================================================== INVENTORY GUI ==================================================
When /postp is used, open a Minecraft inventory INVENTORY GUI.
The INVENTORY GUI should contain the available teleport locations for the player's current world.
Each teleport should have:
- Custom item
- Custom name
- Lore
- Slot
- Description
- World name
- Biome name
When a Java Edition player moves the mouse cursor over an item, the normal Minecraft item tooltip should show its name and lore.
Example:
Spawn
World: survival Biome: Plains
Click to teleport.
================================================== TELEPORT ==================================================
When the player clicks a teleport location:
Teleport the player to that saved location.
Optionally use a countdown before teleporting.
Default countdown:
3 seconds.
Show:
Teleporting... 3 2 1
Then teleport.
The countdown can be cancelled if the player moves or takes damage.
Cooldown must also be configurable.
================================================== WORLD-SPECIFIC LOBBY ==================================================
Every enabled world can have its own Lobby.
Admin uses:
/lobbyset
while standing at the desired lobby location.
Example:
Survival:
Lobby = Survival Lobby
Lifesteal:
Lobby = Lifesteal Lobby
Skyblock:
Lobby = Skyblock Lobby
When a player is in Survival and uses:
/lobby
they must go to the Survival Lobby.
When a player is in Lifesteal and uses:
/lobby
they must go to the Lifesteal Lobby.
The Lobby is always based on the player's current world.
================================================== GLOBAL HUB ==================================================
There is one Main Hub for the entire server.
Admin uses:
/hubset
while standing at the desired location.
This location becomes the Main Hub.
When any player uses:
/hub
they are teleported to the Main Hub.
Unlike /lobby:
/lobby = current world's lobby
/hub = server's main/global hub
================================================== ENABLED WORLDS ==================================================
The plugin must have a configuration where the server owner can choose which worlds PosTP works in.
Example:
enabled worlds:
- survival
- lifesteal
- skyblock
If a player is in a world that is not enabled, /postp should not open the INVENTORY GUI.
Show a configurable message such as:
PosTP is not available in this world.
================================================== HUB PROTECTION ==================================================
The world where /hubset was created must automatically become the protected Hub world.
The Hub must be a completely safe area.
Normal players cannot:
- Break blocks
- Place blocks
- Use buckets
- Place water
- Place lava
- Use flint and steel
- Use TNT
- Create explosions
- Damage entities
- Edit armor stands
- Break item frames
- Break paintings
- Destroy vehicles
================================================== HUB PVP ==================================================
PvP must be completely disabled in the Hub.
Players cannot damage other players.
Disable:
- Melee PvP
- Bow damage
- Crossbow damage
- Trident damage
- Projectile damage
- Splash potion damage
- Lingering potion damage
- TNT damage
- End crystal damage
- Player-caused fire damage
If someone tries to attack another player:
PvP is disabled in the Hub.
================================================== HUB MOB PROTECTION ==================================================
The Hub must not allow unwanted mobs to spawn.
Disable:
- Hostile mobs
- Animals
- Ambient mobs
- Water mobs
- Phantoms
- Patrols
- Other unwanted entity spawning
Also prevent:
- Creeper explosions
- TNT explosions
- Wither damage
- Ender Dragon block damage
- Enderman griefing
================================================== HUB WEATHER ==================================================
The Hub weather must be configurable.
Default:
CLEAR
The server owner can choose:
CLEAR RAIN THUNDER
Weather locking can be enabled or disabled.
================================================== HUB TIME ==================================================
The Hub time can optionally be locked.
For example:
DAY
or a specific Minecraft time.
================================================== DEVELOPER ACCESS ==================================================
The Hub must remain protected even for:
Only users with the developer permission:
postp.dev
can bypass Hub protection.
A developer can build and edit the Hub normally.
Admin/OP without postp.dev must still be unable to build.
================================================== BACK ==================================================
Provide:
/back
This returns the player to their previous location.
The previous location should be saved after a successful PosTP teleport.
It should work with:
- Hub teleport
- Lobby teleport
- Spawn teleport
================================================== PERMISSIONS ==================================================
Provide permissions for:
postp.use postp.admin postp.reload postp.dev postp.hub postp.lobby postp.back postp.spawn
The developer permission is specifically used for Hub editing/protection bypass.
================================================== PLACEHOLDERAPI ==================================================
If PlaceholderAPI is installed, PosTP should provide placeholders.
Useful placeholders include:
%postp_world%
%postp_world_enabled%
%postp_hub%
%postp_hub_world%
%postp_is_hub%
%postp_lobby%
%postp_is_lobby%
%postp_current_spawn%
%postp_last_spawn%
%postp_spawn_count%
%postp_spawn_biome%
%postp_countdown%
%postp_cooldown%
%postp_total_teleports%
%postp_is_dev%
%postp_hub_players%
%postp_lobby_players%
These placeholders can be used in TAB, scoreboards, holograms and other PlaceholderAPI-supported plugins.
================================================== OPTIONAL PLUGIN SUPPORT ==================================================
The plugin should be able to work alongside:
- PlaceholderAPI
- LuckPerms
- Multiverse-Core
- Vault
- WorldEdit
- WorldGuard
- DecentHolograms
These should not be required for the basic PosTP system.
If they are installed, PosTP can use their functionality where appropriate.
================================================== CONFIGURATION ==================================================
The server owner should be able to configure:
- Enabled worlds
- INVENTORY GUI title
- INVENTORY GUI size
- Spawn item
- Spawn name
- Spawn lore
- Spawn slot
- Teleport countdown
- Teleport cooldown
- Cancel teleport on movement
- Cancel teleport on damage
- Hub protection
- Hub PvP
- Hub mob spawning
- Hub explosions
- Hub weather
- Hub time
- Developer permission
- Messages
- Sounds
- Particles
================================================== OVERALL BEHAVIOR ==================================================
The final plugin should work like this:
NPC ↓ NPC executes /postp ↓ PosTP detects player's current world ↓ PosTP opens that world's teleport INVENTORY GUI ↓ Player selects a location ↓ Teleport to saved location
/lobby ↓ Detect current world ↓ Teleport to that world's Lobby
/hub ↓ Ignore current world ↓ Teleport to the global Main Hub
/hubset ↓ Save current location as Main Hub ↓ Automatically protect that world
/postpset Spawn1 add ↓ Save current location ↓ Assign spawn to current world
Hub ↓ No building No breaking No PvP No unwanted mobs No weather changes No explosions
postp.dev ↓ Developer can bypass Hub protection
The plugin must be designed as a professional, clean, configurable teleport and hub-management system for Minecraft Java Edition Paper 1.21.x.