Package com.ryandw11.structure.schematic
Class StructureSignHandler
java.lang.Object
com.ryandw11.structure.schematic.StructureSignHandler
This handles the registration of structure signs.
Get the instance of this handler from CustomStructures.getStructureSignHandler()
.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionMap<String,Class<? extends StructureSign>>
Get a map of the registered structure signs.Class<? extends StructureSign>
getStructureSign(@NotNull String name)
Get a structure sign using its name.boolean
registerStructureSign(@NotNull String name, @NotNull Class<? extends StructureSign> structureSignClass)
Register a structure sign with the plugin.boolean
structureSignExists(@NotNull String name)
Check if a structure sign exists.
-
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
Get a map of the registered structure signs.- Returns:
- A map of the registered structure signs.
-
getStructureSign
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
Check if a structure sign exists.- Parameters:
name
- The name to check.- Returns:
- If it exists.
-