EnderPearlPorter
Functionality
The plugin allows players to specify a target player when launching an End Pearl. When a player holds an End Pearl with a display name that matches the name of a player who is currently online, the plugin changes the shooter of the launched End Pearl to be the specified player, rather than the original player who launched it. The plugin also sends a message to the original player indicating the online status of the specified player.
Usage
To use the plugin, a player must change the display name of an End Pearl to match the name of the desired target player. The display name can be changed by using an anvil and renaming the End Pearl. The player then holds the renamed End Pearl in their hand and launches it as normal. If the target player is online, the shooter of the launched End Pearl will be the target player, and the plugin will send a message to the original player indicating that the target player is online.
Implementation
The plugin is implemented as a JavaPlugin and uses the Bukkit API to interact with the game. It implements the Listener interface to listen for events related to player inventory and projectile launches. The plugin registers itself as a listener with the Bukkit plugin manager and uses two event handlers to modify the behavior of End Pearls.
Comments