Class OfflineAttachments

java.lang.Object
net.ixdarklord.coolcatcore.internal.attachment.OfflineAttachments

public final class OfflineAttachments extends Object
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    exists(net.minecraft.server.MinecraftServer server, UUID id)
    Whether the player has data here (has played on this world or server), online or not.
    static <T> T
    get(net.minecraft.server.MinecraftServer server, UUID id, Attachment<T> key)
     
    static <T> boolean
    set(net.minecraft.server.MinecraftServer server, UUID id, Attachment<T> key, T value)
    Sets the value (or, for null, removes it).
    static <T> boolean
    update(net.minecraft.server.MinecraftServer server, UUID id, Attachment<T> key, UnaryOperator<T> function)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • get

      public static <T> T get(net.minecraft.server.MinecraftServer server, UUID id, Attachment<T> key)
    • set

      public static <T> boolean set(net.minecraft.server.MinecraftServer server, UUID id, Attachment<T> key, @Nullable T value)
      Sets the value (or, for null, removes it). False if the player has never played here.
    • update

      public static <T> boolean update(net.minecraft.server.MinecraftServer server, UUID id, Attachment<T> key, UnaryOperator<T> function)
    • exists

      public static boolean exists(net.minecraft.server.MinecraftServer server, UUID id)
      Whether the player has data here (has played on this world or server), online or not.