Returns a list of all objects, which are placed on the placeholder with the name placeholderName in this mechatronic component.
getPlaceholderObjects(String placeholderName) | |||
---|---|---|---|
Argument | String | placeholderName | The name of the placeholder of the component. |
Return value | List | List of mechatronic objects | |
Exceptions | Throws a PlaceholderNotExistingException, if no placeholder with the specified name exists. |
import org.foederal.util.ui.messages.UserMessageCollector;
import com.mind8.mechatronic.skill.api.PlaceholderNotExistingException;
try
{
objects = component.getPlaceholderObjects("SchematicPages");
}
catch (PlaceholderNotExistingException ex)
{
UserMessageCollector.addError(LIBRARY,self,null,"Skript",
"Script error: A placeholder named 'SchematicPages' does not exist!");
return;
}
Result:
[<<M_SchematicPage>>,<<M_SchematicPage2>>]