Record Class PacketAccessPolicy
java.lang.Object
java.lang.Record
dev.shamoo.runtime.platform.paper.packet.PacketAccessPolicy
public record PacketAccessPolicy(boolean enabled, Set<dev.shamoo.runtime.core.PluginId> permittedPlugins)
extends Record
Immutable server-operator opt-in for exact-version NMS packet access.
-
Constructor Summary
ConstructorsConstructorDescriptionPacketAccessPolicy(boolean enabled, Set<dev.shamoo.runtime.core.PluginId> permittedPlugins) Creates an instance of aPacketAccessPolicyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanenabled()Returns the value of theenabledrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Set<dev.shamoo.runtime.core.PluginId> Returns the value of thepermittedPluginsrecord component.voidrequire(dev.shamoo.runtime.core.PluginId pluginId) final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PacketAccessPolicy
Creates an instance of aPacketAccessPolicyrecord class.- Parameters:
enabled- the value for theenabledrecord componentpermittedPlugins- the value for thepermittedPluginsrecord component
-
-
Method Details
-
require
public void require(dev.shamoo.runtime.core.PluginId pluginId) -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
enabled
public boolean enabled()Returns the value of theenabledrecord component.- Returns:
- the value of the
enabledrecord component
-
permittedPlugins
Returns the value of thepermittedPluginsrecord component.- Returns:
- the value of the
permittedPluginsrecord component
-