Class PermissionEvent
java.lang.Object
com.minecolonies.api.colony.permissions.PermissionEvent
Permission event class, used to store events happening in the colony.
-
Constructor Summary
ConstructorsConstructorDescriptionPermissionEvent(UUID id, String name, Action action, net.minecraft.core.BlockPos position) Constructor for permission events.PermissionEvent(net.minecraft.network.RegistryFriendlyByteBuf buf) Constructor for permission events. -
Method Summary
Modifier and TypeMethodDescriptionbooleanThe action causing the event.@Nullable UUIDgetId()The UUID of the player causing the event.getName()The name of the player causing the event.net.minecraft.core.BlockPosThe position at which the event had happened.inthashCode()voidserialize(net.minecraft.network.RegistryFriendlyByteBuf buf) Serialize the permission event to a ByteBuf.
-
Constructor Details
-
PermissionEvent
Constructor for permission events.- Parameters:
id- the player UUID.name- the player name.action- the action happening.position- the position of the action.
-
PermissionEvent
public PermissionEvent(net.minecraft.network.RegistryFriendlyByteBuf buf) Constructor for permission events. to load them from a ByteBuf.- Parameters:
buf- the ByteBuf.
-
-
Method Details
-
getId
The UUID of the player causing the event.- Returns:
- the UUID.
-
getName
The name of the player causing the event.- Returns:
- the name String.
-
getAction
The action causing the event.- Returns:
- the Action
-
getPosition
public net.minecraft.core.BlockPos getPosition()The position at which the event had happened.- Returns:
- the BlockPos.
-
serialize
public void serialize(net.minecraft.network.RegistryFriendlyByteBuf buf) Serialize the permission event to a ByteBuf.- Parameters:
buf- the buffer.
-
equals
-
hashCode
public int hashCode()
-