Enum Class PlayerFileUploadEvent.Result
java.lang.Object
java.lang.Enum<PlayerFileUploadEvent.Result>
net.risingworld.api.events.player.ui.PlayerFileUploadEvent.Result
- All Implemented Interfaces:
Serializable, Comparable<PlayerFileUploadEvent.Result>, Constable
- Enclosing class:
PlayerFileUploadEvent
The result of an upload.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe target file already exists (and overwriting was disabled)The upload was cancelled (seeClientFile.cancelUpload())The uploaded data does not match the checksum of the selected fileThe player disconnected during the uploadAn error occurred (e.g. the file could not be read by the player or could not be written by the server)The file no longer exists on the player's computer or was changed since it was selectedThe file was uploaded successfullyThe player did not send any data for 30 seconds (e.g. connection problems, or the file is locked on the player's computer)The file exceeds the max allowed size (provided by the plugin or set in the server.properties), or it exceeded the limit of the file browser (no checksum, seePlayerSelectFileEvent.isTooLarge())File uploads are disabled on this server (server.properties: Plugins_MaxFileUploadSize=0) -
Method Summary
Modifier and TypeMethodDescriptionstatic PlayerFileUploadEvent.ResultReturns the enum constant of this class with the specified name.static PlayerFileUploadEvent.Result[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
Success
The file was uploaded successfully -
UploadsDisabled
File uploads are disabled on this server (server.properties: Plugins_MaxFileUploadSize=0) -
TooLarge
The file exceeds the max allowed size (provided by the plugin or set in the server.properties), or it exceeded the limit of the file browser (no checksum, seePlayerSelectFileEvent.isTooLarge()) -
AlreadyExists
The target file already exists (and overwriting was disabled) -
Cancelled
The upload was cancelled (seeClientFile.cancelUpload()) -
Disconnected
The player disconnected during the upload -
FileChanged
The file no longer exists on the player's computer or was changed since it was selected -
ChecksumMismatch
The uploaded data does not match the checksum of the selected file -
Timeout
The player did not send any data for 30 seconds (e.g. connection problems, or the file is locked on the player's computer) -
Error
An error occurred (e.g. the file could not be read by the player or could not be written by the server)
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-