Class TeleportRequestUtil

java.lang.Object
net.lewmc.essence.utils.TeleportRequestUtil

public class TeleportRequestUtil extends Object
The TeleportRequestUtil class.
  • Constructor Details

    • TeleportRequestUtil

      public TeleportRequestUtil(Essence plugin)
      Constructor for the TeleportRequestUtil class.
      Parameters:
      plugin - Reference to main Essence class.
  • Method Details

    • createRequest

      public void createRequest(String requester, String requested, boolean teleportToRequester)
      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

      public boolean deleteFromRequester(String requester)
      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

      public void deleteFromRequested(String requested)
      Deletes a request by finding it from the requested player.
      Parameters:
      requested - String - Name of the requested player.
    • acceptRequest

      public boolean acceptRequest(String requested)
      Accepts a teleportation request.
      Parameters:
      requested - String - Name of the requested player.
      Returns:
      boolean - Success