More tests, fixed patcher error handler
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package mindustry.world.meta;
|
||||
|
||||
import arc.struct.*;
|
||||
import arc.util.*;
|
||||
import mindustry.*;
|
||||
|
||||
public class Attribute{
|
||||
@@ -47,6 +48,11 @@ public class Attribute{
|
||||
return map.getThrow(name, () -> new IllegalArgumentException("Unknown Attribute type: " + name));
|
||||
}
|
||||
|
||||
/** May return null. */
|
||||
public static @Nullable Attribute getOrNull(String name){
|
||||
return map.get(name);
|
||||
}
|
||||
|
||||
/** @return Whether an attribute exists. */
|
||||
public static boolean exists(String name){
|
||||
return map.containsKey(name);
|
||||
|
||||
Reference in New Issue
Block a user