mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-02-16 02:20:57 +00:00
only apply shortcut if loaded config is a string
This commit is contained in:
@@ -35,8 +35,7 @@ public class ShortcutHolder<T> implements TypeLoader<T> {
|
||||
@Override
|
||||
public T load(@NotNull AnnotatedType annotatedType, @NotNull Object o, @NotNull ConfigLoader configLoader, DepthTracker depthTracker)
|
||||
throws LoadException {
|
||||
String id = (String) o;
|
||||
if(id.contains(":")) {
|
||||
if(o instanceof String id && id.contains(":")) {
|
||||
String shortcut = id.substring(0, id.indexOf(":"));
|
||||
if(shortcuts.containsKey(shortcut)) {
|
||||
return shortcuts.get(shortcut).load(configLoader, id.substring(id.indexOf(":") + 1),
|
||||
|
||||
Reference in New Issue
Block a user