Class Request

java.lang.Object
com.sk89q.worldedit.session.request.Request

public final class Request extends Object
Describes the current request using a ThreadLocal.
  • Method Details

    • getAll

      public static Collection<Request> getAll()
    • getWorld

      @Nullable public World getWorld()
      Get the request world.
      Returns:
      the world, which may be null
    • setWorld

      public void setWorld(@Nullable World world)
      Set the request world.
      Parameters:
      world - the world, which may be null
    • setExtent

      public void setExtent(@Nullable Extent extent)
    • getExtent

      @Nullable public Extent getExtent()
    • getActor

      @Nullable public Actor getActor()
    • setActor

      public void setActor(@Nullable Actor actor)
    • getSession

      @Nullable public LocalSession getSession()
      Get the request session.
      Returns:
      the session, which may be null
    • setSession

      public void setSession(@Nullable LocalSession session)
      Get the request session.
      Parameters:
      session - the session, which may be null
    • getEditSession

      @Nullable public EditSession getEditSession()
      Get the EditSession.
      Returns:
      the edit session, which may be null
    • setEditSession

      public void setEditSession(@Nullable EditSession editSession)
      Set the EditSession.
      Parameters:
      editSession - the edit session, which may be null
    • request

      public static Request request()
      Get the current request, which is specific to the current thread.
      Returns:
      the current request
    • reset

      public static void reset()
      Reset the current request and clear all fields.
    • isValid

      public boolean isValid()
      Check if the current request object is still valid. Invalid requests may contain outdated values.
      Returns:
      true if the request is valid