Contents
- Description
- Constructor Summary
- Method Summary
- Constructor Details
- Method Details
- getLanguage()
- setLanguage(String)
- getUuid()
- getUsername()
- getAuth()
- getPacketHandler()
- tryGetPlayer()
- hasPermission(String)
- hasPermission(String, boolean)
- hasPermission(PermissionQuery)
- hasPermission(PermissionQuery, boolean)
- sendPopupNotification(AssetEditorPopupNotificationType, Message)
- sendSuccessReply(int)
- sendSuccessReply(int, Message)
- sendFailureReply(int, Message)
Class EditorClient
java.lang.Object
com.hypixel.hytale.builtin.asseteditor.EditorClient
- All Implemented Interfaces:
PermissionHolder
- Since:
- 2021/03/29
-
Constructor Summary
ConstructorsConstructorDescriptionEditorClient(PlayerRef playerRef) Deprecated.EditorClient(String language, PlayerAuthentication auth, PacketHandler packetHandler) EditorClient(String language, UUID uuid, String username, PacketHandler packetHandler) -
Method Summary
Modifier and TypeMethodDescriptiongetAuth()getUuid()booleanhasPermission(PermissionQuery query) Determines whether the associated instance has the given permission.booleanhasPermission(PermissionQuery query, boolean def) booleanhasPermission(String id) Whether their attached permissions contains the id.booleanhasPermission(String id, boolean def) Determines whether the associated instance has the given permission.voidsendFailureReply(int token, Message message) voidsendPopupNotification(AssetEditorPopupNotificationType type, Message message) voidsendSuccessReply(int token) voidsendSuccessReply(int token, Message message) voidsetLanguage(String language)
-
Constructor Details
-
EditorClient
public EditorClient(String language, @Nonnull PlayerAuthentication auth, PacketHandler packetHandler) -
EditorClient
-
EditorClient
Deprecated.Creates a mock EditorClient object wrapping a Player. This should not be used by any new code.- Parameters:
playerRef- The player
-
-
Method Details
-
getLanguage
-
setLanguage
-
getUuid
-
getUsername
-
getAuth
-
getPacketHandler
-
tryGetPlayer
-
hasPermission
Description copied from interface:PermissionHolderWhether their attached permissions contains the id. This will also attempt to find wildcard matches.For example, if their permissions contain "hytale.*", the check "hytale.permission-test" will return
If they have the root "*" permission, all returns will betrue.true.- Specified by:
hasPermissionin interfacePermissionHolder- Parameters:
id- the permission.- Returns:
trueif they have the permission,falseotherwise.
-
hasPermission
Description copied from interface:PermissionHolderDetermines whether the associated instance has the given permission.- Specified by:
hasPermissionin interfacePermissionHolder- Parameters:
id- The identifier of the permission.def- The default value to return if the player does not have the permission.- Returns:
trueif they have the permission,falseotherwise.
-
hasPermission
Description copied from interface:PermissionHolderDetermines whether the associated instance has the given permission.A holder that resolves permissions itself should override this, because a lookup built once and reused costs an order of magnitude less than one built for each check.
- Specified by:
hasPermissionin interfacePermissionHolder- Parameters:
query- The lookup for the permission.- Returns:
trueif they have the permission,falseotherwise.
-
hasPermission
- Specified by:
hasPermissionin interfacePermissionHolder- Parameters:
query- The lookup for the permission.def- The default value to return if nothing decides.- Returns:
trueif they have the permission,falseotherwise.- See Also:
-
sendPopupNotification
-
sendSuccessReply
public void sendSuccessReply(int token) -
sendSuccessReply
-
sendFailureReply
-