Class UtilTeleportRequest
java.lang.Object
net.lewmc.essence.teleportation.tp.UtilTeleportRequest
The TeleportRequestUtil class.
-
Constructor Summary
ConstructorsConstructorDescriptionUtilTeleportRequest(Essence plugin) Constructor for the TeleportRequestUtil class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanacceptRequest(String requested) Accepts a teleportation request.voidcreateRequest(String requester, String requested, boolean teleportToRequester) Creates a teleportation request.voiddeleteFromRequested(String requested) Deletes a request by finding it from the requested player.booleandeleteFromRequester(String requester) Deletes a teleport request by finding it from the requesting player.
-
Constructor Details
-
UtilTeleportRequest
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
-