Record Class PlatformData
java.lang.Object
java.lang.Record
io.github.miniplaceholders.api.provider.PlatformData
- Record Components:
serverInstance
- The server instance.
In Paper it will beorg.bukkit.Server
,
in Velocity it will becom.velocitypowered.api.proxy.ProxyServer
,
in Sponge it will beorg.spongepowered.api.Server
,
and in Fabric it will benet.minecraft.server.MinecraftServer
.complementInstance
- The main class of MiniPlaceholders, either as a plugin or mod.
In Paper it will beorg.bukkit.plugin.java.JavaPlugin
,
in Velocity it will beio.github.miniplaceholders.velocity.VelocityPlugin
,
in Sponge it will beio.github.miniplaceholders.sponge.SpongePlugin
,
and in Fabric it will benet.fabricmc.api.ModInitializer
.
Wrapper for platform-dependent instances.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPlatformData
(Object serverInstance, Object complementInstance) Creates an instance of aPlatformData
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecomplementInstance
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of theserverInstance
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
PlatformData
Creates an instance of aPlatformData
record class.- Parameters:
serverInstance
- the value for theserverInstance
record componentcomplementInstance
- the value for thecomplementInstance
record component
-
-
Method Details
-
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. All components in this record class are compared withObjects::equals(Object,Object)
. -
serverInstance
Returns the value of theserverInstance
record component.- Returns:
- the value of the
serverInstance
record component
-
complementInstance
Returns the value of thecomplementInstance
record component.- Returns:
- the value of the
complementInstance
record component
-