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 be org.bukkit.Server,
in Velocity it will be com.velocitypowered.api.proxy.ProxyServer,
in Sponge it will be org.spongepowered.api.Server,
and in Fabric it will be net.minecraft.server.MinecraftServer.
complementInstance - The main class of MiniPlaceholders, either as a plugin or mod.
In Paper it will be org.bukkit.plugin.java.JavaPlugin,
in Velocity it will be io.github.miniplaceholders.velocity.VelocityPlugin,
in Sponge it will be io.github.miniplaceholders.sponge.SpongePlugin,
and in Fabric it will be net.fabricmc.api.ModInitializer.

public record PlatformData(Object serverInstance, Object complementInstance) extends Record
Wrapper for platform-dependent instances.
See Also:
  • Constructor Details

    • PlatformData

      public PlatformData(Object serverInstance, Object complementInstance)
      Creates an instance of a PlatformData record class.
      Parameters:
      serverInstance - the value for the serverInstance record component
      complementInstance - the value for the complementInstance record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • serverInstance

      public Object serverInstance()
      Returns the value of the serverInstance record component.
      Returns:
      the value of the serverInstance record component
    • complementInstance

      public Object complementInstance()
      Returns the value of the complementInstance record component.
      Returns:
      the value of the complementInstance record component