ITeleporter
Basic Description
I have tried a different approach to a teleport request system, using Bukkit's Metadata system. The request attaches a custom object to a Metadata value on a Player, which allows for easy access and a simple way of creating an accept command without the use of any Lists or Maps defined by my plugin.
My Vision
I have a vision for this plugin and all of its predecessors, and that is to make Bukkit's metadata system more popular. If you go through the Bukkit's plugin development, you'll see that not many people ask questions about it or post resources about it, or even use it much. I'd like this to change. I will be going through a large form of plugin ideas and trying to recreate them with metadata (I.E. some of Essential's commands), and will be updating the links here and on my BukkitDev account.
Detailed Description
In a developer's perspective: The interface for Entity extends Metadatable, allowing for the use of its functions. The functions provide a base for all Entities to store data about themself using Metadata, allowing for storage of Objects on Entities, and many other things. The plugin basically uses an object I made that stores the type of teleport request, who sent it, and who it is going to, and using that Object, I attach it to a Player (which has a superinterface of Entity), along with a plugin variable for identification of what plugin attached it. The object is then retrieved on a command, and logic is preformed to handle the request based on what was attached to the entity and what command they used.
Commands and Permissions
| Command | Aliases | Permission |
|---|---|---|
| /tprequestaccept | /tpra, /tpraccept | metadatatp.tpra |
| /tprequestdeny | /tprd, /tprdeny | metadatatp.tprd |
| /tphererequest | /tprh, /tprhere | metadatatp.tprh |
| /tprequest | /tpr, /tpreq | metadatatp.tpr |
Source Code
Quote from TigerReborn:I have decided to make the plugin Open Source, the GitHub Repo can be found at: https://github.com/TigerReborn/MetadataTP Note: The repo may not be updated frequently as I may forget to make pushes
Planned Features
(?) - Questioned feature
- Delays and cooldowns
- Language files to allow changing the message
- API (?)
- Update to handle Bukkit's change to UUID (?)
Suggestions
Feel free to give suggestions in the comments or on the ticket page!