
Oneway elytra
OneWay Elytra
A Minecraft plugin for Paper/Spigot 1.21.1 that implements a special elytra system with radius-based restrictions.
What does this plugin do?
This plugin creates a "OneWay Elytra" system where certain Elytras can only be used within a configurable radius around a spawn point. Normal Elytras work as usual and are not affected.
Features
- Radius-based Elytra usage: OneWay Elytras can only be worn within a defined radius around the spawn point
- Automatic Elytra management:
- Players automatically receive a OneWay Elytra when entering the radius
- The Elytra is automatically removed when players leave the radius (only when not gliding)
- Action bar warning when chestplate slot is occupied: "Remove your chestplate first to receive the OneWay Elytra!"
- Abuse prevention:
- New gliding cannot be started outside the radius
- Players already flying can continue their flight until landing
- Landing detection: When a player lands outside the radius, the Elytra is automatically removed
- Flexible removal modes:
MOVE_TO_INVENTORY: Elytra is moved to inventory (or dropped if full)DROP: Elytra is immediately deleted (cannot be picked up)
- Multilingual support:
- German (de) and English (en) language files included
- All messages can be customized in
lang/de.ymlorlang/en.yml - Config option
lang: deorlang: ento switch languages
Installation
- Download the
OneWayElytra-1.0.0.jarfile - Place it in your server's
pluginsfolder - Restart your server
- Configure the spawn point and radius (see below)
Configuration
The configuration file is located at plugins/OneWayElytra/config.yml:
# OneWay Elytra Plugin configuration
# Language: de = German, en = English (message files in plugin folder: lang/de.yml, lang/en.yml)
lang: en
# Spawn point (world + coordinates)
spawn:
world: "world"
x: 0.0
y: 64.0
z: 0.0
# Radius in blocks
radius: 100
# Remove mode when leaving zone: MOVE_TO_INVENTORY or DROP
removeMode: "MOVE_TO_INVENTORY"
# Debug mode (extra console output)
debug: false
Language Files
All player-facing messages are stored in language files:
plugins/OneWayElytra/lang/de.yml- German messages (default)plugins/OneWayElytra/lang/en.yml- English messages
These files are created automatically on first start and can be edited to customize messages. Use & for color codes (e.g., &c for red, &a for green).
Commands
/oe setspawn
Sets the spawn point to your current position.
/oe setradius <blocks>
Sets the radius in blocks (e.g., /oe setradius 50).
/oe setremovemode <MOVE_TO_INVENTORY|DROP>
Changes the removal mode:
MOVE_TO_INVENTORY: Elytra is moved to inventoryDROP: Elytra is deleted
/oe info
Shows the current configuration (spawn point, radius, removal mode).
/oe reload
Reloads the configuration file and language files.
/oe give <player> [amount]
Gives a player one or multiple OneWay Elytras.
/oe tag
Marks the Elytra in your hand as a OneWay Elytra.
/oe untag
Removes the mark from the Elytra in your hand.
/oe check
Checks if the Elytra in your hand is a OneWay Elytra.
Aliases: /onewayelytra, /oneway
Permissions
onewayelytra.admin- Allows all admin commands (default: OP)onewayelytra.bypass- Ignores all OneWay Elytra rules (default: OP)
How it works
- Elytra marking: OneWay Elytras are marked via PersistentDataContainer (PDC) with a special tag
- Automatic distribution: When a player enters the defined radius without a OneWay Elytra, they automatically receive one
- Glide protection: When starting a glide, the plugin checks if the player is within the radius. Outside the radius, the start is blocked
- Landing detection: A task checks every 2 ticks if players have landed and removes the Elytra if they're outside the radius
Technical Details
- API Version: 1.21.1
- Dependencies: None (Paper API only)
- Java Version: 21
- Marking: PersistentDataContainer with NamespacedKey
onewayelytra:oneway
Troubleshooting
Problem: Elytra is not automatically given/removed
- Check if the spawn point is correctly set (
/oe info) - Check if you're within the correct radius
- Enable debug mode in the config (
debug: true) and check the console
Problem: Special characters are displayed incorrectly
- Make sure the config file is saved as UTF-8
- The build file is already configured for UTF-8
License
- You can find the license here