Interface Actor
- All Superinterfaces:
Identifiable
,MapMetadatable
,Metadatable
,SessionOwner
,Subject
- All Known Subinterfaces:
Player
- All Known Implementing Classes:
AbstractNonPlayerActor
,AbstractPlayerActor
,AsyncPlayer
,LocationMaskedPlayerWrapper
,PlayerProxy
,SilentPlayerWrapper
An object that can perform actions in WorldEdit.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.fastasyncworldedit.core.entity.Metadatable
Metadatable.METADATA_KEYS
-
Field Summary
Fields inherited from interface com.sk89q.worldedit.util.Identifiable
CONSOLE, EVERYONE
-
Method Summary
Modifier and TypeMethodDescriptiondefault int
cancel
(boolean close) Attempt to cancel all pending and running actions.boolean
Returns true if the actor can destroy bedrock.default boolean
default boolean
confirm()
Confirm any pending actions.default boolean
decline()
Decline any pending actions.void
dispatchCUIEvent
(CUIEvent event) Send a CUI event.default String
Gets the display name of the actor.default FaweLimit
getLimit()
Get the locale of this actor.getName()
Get the name of the actor.boolean
isPlayer()
Return whether this actor is a player.openFileOpenDialog
(String[] extensions) Open a file open dialog.openFileSaveDialog
(String[] extensions) Open a file save dialog.void
print
(com.sk89q.worldedit.util.formatting.text.Component component) Print aComponent
.void
Deprecated.Use component-based functions (printInfo)default void
printDebug
(com.sk89q.worldedit.util.formatting.text.Component component) Print a WorldEdit message.void
printDebug
(String msg) Deprecated.Use component-based functions (printDebug)default void
printError
(com.sk89q.worldedit.util.formatting.text.Component component) Print a WorldEdit error.void
printError
(String msg) Deprecated.Use component-based functions (printError)default void
printInfo
(com.sk89q.worldedit.util.formatting.text.Component component) Print a WorldEdit message.void
Deprecated.Use component-based functions (print)default void
queueAction
(Runnable run) Queue an action to run async.boolean
default boolean
default boolean
default void
Sends any relevant notices to the user when they first use WorldEdit in a session.Methods inherited from interface com.sk89q.worldedit.util.Identifiable
getUniqueId
Methods inherited from interface com.fastasyncworldedit.core.entity.MapMetadatable
deleteMeta, getAndSetMeta, getMeta, getMeta, getRawMeta, hasMeta, putIfAbsent, setMeta
Methods inherited from interface com.sk89q.worldedit.session.SessionOwner
getSession, getSessionKey
Methods inherited from interface com.sk89q.worldedit.util.auth.Subject
checkPermission, getGroups, hasPermission, setPermission, togglePermission
-
Method Details
-
getName
String getName()Get the name of the actor.- Returns:
- 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.Use component-based functions (print)Print a message.- Parameters:
msg
- The message text
-
printDebug
Deprecated.Use component-based functions (printDebug)Print a WorldEdit message.- Parameters:
msg
- The message text
-
print
Deprecated.Use component-based functions (printInfo)Print a WorldEdit message.- Parameters:
msg
- The message text
-
printError
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 aComponent
.- 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
Open a file open dialog.- Parameters:
extensions
- null to allow all- Returns:
- the selected file or null if something went wrong
-
openFileSaveDialog
Open a file save dialog.- Parameters:
extensions
- null to allow all- Returns:
- the selected file or null if something went wrong
-
dispatchCUIEvent
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
-
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
Queue an action to run async.- Parameters:
run
- the action to run
-
checkAction
default boolean checkAction() -
getLimit
-
runAsyncIfFree
-
runIfFree
-
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
-