Class PropertyRegistry

java.lang.Object
org.skriptlang.skript.lang.properties.PropertyRegistry
All Implemented Interfaces:
Iterable<Property<?>>, Registry<Property<?>>

@Experimental public class PropertyRegistry extends Object implements Registry<Property<?>>
A registry handling Propertys. Skript and addons should register any new properties here to avoid conflicts. If a conflict does occur, your property will fail to register and return false. You should check if your property has a matching handler with the already registered one. If so, you should be able to use the other property instead of your own.
  • Constructor Details

    • PropertyRegistry

      public PropertyRegistry(Skript skript)
  • Method Details

    • register

      public boolean register(@NotNull @NotNull Property<?> property)
    • unregister

      public boolean unregister(@NotNull @NotNull Property<?> property)
    • unregister

      public boolean unregister(String name)
    • elements

      public @Unmodifiable Collection<Property<?>> elements()
      Specified by:
      elements in interface Registry<Property<?>>
      Returns:
      A collection of all elements in this registry.
    • get

      public Property<?> get(String name)
    • isRegistered

      public boolean isRegistered(@NotNull @NotNull Property<?> property)
    • isRegistered

      public boolean isRegistered(@NotNull @NotNull String name)