Interface Actor
- All Superinterfaces:
Identifiable
,SessionOwner
,Subject
- All Known Subinterfaces:
Player
- All Known Implementing Classes:
AbstractNonPlayerActor
,AbstractPlayerActor
An object that can perform actions in WorldEdit.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns true if the actor can destroy bedrock.void
dispatchCUIEvent
(CUIEvent event) Send a CUI event.default String
Gets the display name of the actor.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
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.sk89q.worldedit.session.SessionOwner
getSessionKey
Methods inherited from interface com.sk89q.worldedit.util.auth.Subject
checkPermission, getGroups, hasPermission
-
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.
-