Package net.lewmc.essence.utils
Class TeleportRequestUtil
java.lang.Object
net.lewmc.essence.utils.TeleportRequestUtil
The TeleportRequestUtil class.
-
Constructor Summary
ConstructorDescriptionTeleportRequestUtil
(Essence plugin) Constructor for the TeleportRequestUtil class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
acceptRequest
(String requested) Accepts a teleportation request.void
createRequest
(String requester, String requested, boolean teleportToRequester) Creates a teleportation request.void
deleteFromRequested
(String requested) Deletes a request by finding it from the requested player.boolean
deleteFromRequester
(String requester) Deletes a teleport request by finding it from the requesting player.
-
Constructor Details
-
TeleportRequestUtil
Constructor for the TeleportRequestUtil class.- Parameters:
plugin
- Reference to main Essence class.
-
-
Method Details
-
createRequest
Creates a teleportation request.- Parameters:
requester
- String - The user sending the request.requested
- String - The user being requested.teleportToRequester
- boolean - If the user being requested should be teleported to the requester (true), or if the requester should be teleported to them (false).
-
deleteFromRequester
Deletes a teleport request by finding it from the requesting player.- Parameters:
requester
- String - Name of the requester.- Returns:
- boolean - If the request was found and deleted.
-
deleteFromRequested
Deletes a request by finding it from the requested player.- Parameters:
requested
- String - Name of the requested player.
-
acceptRequest
Accepts a teleportation request.- Parameters:
requested
- String - Name of the requested player.- Returns:
- boolean - Success
-