Class ComponentPersister

java.lang.Object
net.citizensnpcs.api.persistence.ComponentPersister
All Implemented Interfaces:
Persister<net.kyori.adventure.text.Component>

public class ComponentPersister extends Object implements Persister<net.kyori.adventure.text.Component>
  • Constructor Details

    • ComponentPersister

      public ComponentPersister()
  • Method Details

    • create

      public net.kyori.adventure.text.Component create(DataKey root)
      Description copied from interface: Persister
      Creates an object instance from the given DataKey. Should not return null unless no data is present.
      Specified by:
      create in interface Persister<net.kyori.adventure.text.Component>
      Parameters:
      root - The root key to load from
      Returns:
      The created instance, or null if no data was present
    • save

      public void save(net.kyori.adventure.text.Component text, DataKey root)
      Description copied from interface: Persister
      Saves the object instance to the given DataKey.
      Specified by:
      save in interface Persister<net.kyori.adventure.text.Component>
      Parameters:
      text - The object instance to save
      root - The key to save into