Class StructureSignHandler

java.lang.Object
com.ryandw11.structure.schematic.StructureSignHandler

public class StructureSignHandler extends Object
This handles the registration of structure signs.

Get the instance of this handler from CustomStructures.getStructureSignHandler().

  • Constructor Details

    • StructureSignHandler

      public StructureSignHandler()
      Construct the structure sign handler.

      The plugin's default structure signs are added automatically.

      Internal Use Only.

  • Method Details

    • registerStructureSign

      public boolean registerStructureSign(@NotNull @NotNull String name, @NotNull @NotNull Class<? extends StructureSign> structureSignClass)
      Register a structure sign with the plugin.
      Parameters:
      name - The name of the sign (Not including the brackets []). This is what the user will reference it as on the first line of the sign.
      structureSignClass - The class of the structure sign to register.
      Returns:
      If the sign was successfully registered. If false is returned, then a sign with that name already exists.
    • getRegisteredStructureSigns

      public Map<String,​Class<? extends StructureSign>> getRegisteredStructureSigns()
      Get a map of the registered structure signs.
      Returns:
      A map of the registered structure signs.
    • getStructureSign

      public Class<? extends StructureSign> getStructureSign(@NotNull @NotNull String name)
      Get a structure sign using its name.
      Parameters:
      name - The name of the structure sign.
      Returns:
      The structure sign class. (Null if it does not exist).
    • structureSignExists

      public boolean structureSignExists(@NotNull @NotNull String name)
      Check if a structure sign exists.
      Parameters:
      name - The name to check.
      Returns:
      If it exists.