Interface Actor

All Superinterfaces:
Identifiable, MapMetadatable, Metadatable, SessionOwner, Subject
All Known Subinterfaces:
Player
All Known Implementing Classes:
AbstractNonPlayerActor, AbstractPlayerActor, AsyncPlayer, LocationMaskedPlayerWrapper, PlayerProxy, SilentPlayerWrapper

public interface Actor extends Identifiable, SessionOwner, Subject, MapMetadatable
An object that can perform actions in WorldEdit.
  • Method Details

    • getName

      String getName()
      Get the name of the actor.
      Returns:
      String
    • getDisplayName

      default String getDisplayName()
      Gets the display name of the actor. This can be a nickname, and is not guaranteed to be unique.
      Returns:
      The display name
    • printRaw

      @Deprecated void printRaw(String msg)
      Deprecated.
      Use component-based functions (print)
      Print a message.
      Parameters:
      msg - The message text
    • printDebug

      @Deprecated void printDebug(String msg)
      Deprecated.
      Use component-based functions (printDebug)
      Print a WorldEdit message.
      Parameters:
      msg - The message text
    • print

      @Deprecated void print(String msg)
      Deprecated.
      Use component-based functions (printInfo)
      Print a WorldEdit message.
      Parameters:
      msg - The message text
    • printError

      @Deprecated void printError(String msg)
      Deprecated.
      Use component-based functions (printError)
      Print a WorldEdit error.
      Parameters:
      msg - The error message text
    • printError

      default void printError(com.sk89q.worldedit.util.formatting.text.Component component)
      Print a WorldEdit error.
      Parameters:
      component - The component to print
    • printInfo

      default void printInfo(com.sk89q.worldedit.util.formatting.text.Component component)
      Print a WorldEdit message.
      Parameters:
      component - The component to print
    • printDebug

      default void printDebug(com.sk89q.worldedit.util.formatting.text.Component component)
      Print a WorldEdit message.
      Parameters:
      component - The component to print
    • print

      void print(com.sk89q.worldedit.util.formatting.text.Component component)
      Print a Component.
      Parameters:
      component - The component to print
    • canDestroyBedrock

      boolean canDestroyBedrock()
      Returns true if the actor can destroy bedrock.
      Returns:
      true if bedrock can be broken by the actor
    • isPlayer

      boolean isPlayer()
      Return whether this actor is a player.
      Returns:
      true if a player
    • openFileOpenDialog

      File openFileOpenDialog(String[] extensions)
      Open a file open dialog.
      Parameters:
      extensions - null to allow all
      Returns:
      the selected file or null if something went wrong
    • openFileSaveDialog

      File openFileSaveDialog(String[] extensions)
      Open a file save dialog.
      Parameters:
      extensions - null to allow all
      Returns:
      the selected file or null if something went wrong
    • dispatchCUIEvent

      void dispatchCUIEvent(CUIEvent event)
      Send a CUI event.
      Parameters:
      event - the event
    • getLocale

      Locale getLocale()
      Get the locale of this actor.
      Returns:
      The locale
    • sendAnnouncements

      default void sendAnnouncements()
      Sends any relevant notices to the user when they first use WorldEdit in a session.
    • runAction

      boolean runAction(Runnable ifFree, boolean checkFree, boolean async)
    • decline

      default boolean decline()
      Decline any pending actions.
      Returns:
      true if an action was pending
    • confirm

      default boolean confirm()
      Confirm any pending actions.
      Returns:
      true if an action was pending
    • queueAction

      default void queueAction(Runnable run)
      Queue an action to run async.
      Parameters:
      run - the action to run
    • checkAction

      default boolean checkAction()
    • getLimit

      default FaweLimit getLimit()
    • runAsyncIfFree

      default boolean runAsyncIfFree(Runnable r)
    • runIfFree

      default boolean runIfFree(Runnable r)
    • cancel

      default int cancel(boolean close)
      Attempt to cancel all pending and running actions.
      Parameters:
      close - if Extents are closed
      Returns:
      number of cancelled actions