Class SpiritPermissions
java.lang.Object
net.minecraft.server.players.StoredUserList<com.mojang.authlib.GameProfile,SpiritPermissions.SpiritEntry>
etithespirit.orimod.server.persistence.SpiritPermissions
public final class SpiritPermissions
extends net.minecraft.server.players.StoredUserList<com.mojang.authlib.GameProfile,SpiritPermissions.SpiritEntry>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
static final class
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected net.minecraft.server.players.StoredUserEntry<com.mojang.authlib.GameProfile>
createEntry
(com.google.gson.JsonObject json) get
(net.minecraft.world.entity.player.Player player) Return the permissions for the given player.getEntry
(net.minecraft.world.entity.player.Player player) Returns the raw entry associated with the given player.protected String
getKeyForUser
(com.mojang.authlib.GameProfile profile) static SpiritPermissions
String[]
void
put
(net.minecraft.world.entity.player.Player player, SpiritPermissions.ChangePermissions permissions) void
remove
(net.minecraft.world.entity.player.Player player) Remove this player from data persistence.Methods inherited from class net.minecraft.server.players.StoredUserList
add, contains, get, getEntries, getFile, isEmpty, load, remove, remove, save
-
Field Details
-
SPIRIT_CHANGE_PERMISSIONS
-
-
Constructor Details
-
SpiritPermissions
-
-
Method Details
-
getPermissions
-
put
public void put(net.minecraft.world.entity.player.Player player, SpiritPermissions.ChangePermissions permissions) -
remove
public void remove(net.minecraft.world.entity.player.Player player) Remove this player from data persistence. This is identical to callingput(Player, ChangePermissions)
where the permissions areSpiritPermissions.ChangePermissions.INHERIT_DEFAULT
.- Parameters:
player
- The player to remove.
-
get
Return the permissions for the given player. ReturnsSpiritPermissions.ChangePermissions.INHERIT_DEFAULT
if this player has no permissions registered.- Parameters:
player
- The player to check.- Returns:
- The permissions the player has, or
SpiritPermissions.ChangePermissions.INHERIT_DEFAULT
if this player has no permissions registered.
-
getEntry
@Nullable public SpiritPermissions.SpiritEntry getEntry(net.minecraft.world.entity.player.Player player) Returns the raw entry associated with the given player.- Parameters:
player
- The player to check.- Returns:
- The entry for the given player, or null if no such entry exists.
-
createEntry
protected net.minecraft.server.players.StoredUserEntry<com.mojang.authlib.GameProfile> createEntry(com.google.gson.JsonObject json) - Specified by:
createEntry
in classnet.minecraft.server.players.StoredUserList<com.mojang.authlib.GameProfile,
SpiritPermissions.SpiritEntry>
-
getUserList
- Overrides:
getUserList
in classnet.minecraft.server.players.StoredUserList<com.mojang.authlib.GameProfile,
SpiritPermissions.SpiritEntry>
-
getKeyForUser
- Overrides:
getKeyForUser
in classnet.minecraft.server.players.StoredUserList<com.mojang.authlib.GameProfile,
SpiritPermissions.SpiritEntry>
-