public <T extends ControlWidget> T getHUDElement(String uri, Class<T> type) {
return getHUDElement(new AssetUri(AssetType.UI_ELEMENT, uri), type);
}
public <T extends ControlWidget> T getHUDElement(AssetUri uri, Class<T> type) {
ControlWidget widget = getHUDElement(uri);
if (widget != null && type.isInstance(widget)) {
return type.cast(widget);
}
return null;
}