Allow use of "config name" in default-class.
This is a very simple change that could potentially save a lot of headaches when people look elsewhere in their config-file and see a class name like "Big Gary" and wonder why putting that value in the `default-class` property won't work.
This commit is contained in:
@@ -191,7 +191,8 @@ public class ArenaImpl implements Arena
|
||||
|
||||
String defaultClassName = settings.getString("default-class", null);
|
||||
if (defaultClassName != null) {
|
||||
this.defaultClass = classes.get(defaultClassName);
|
||||
String slug = Slugs.create(defaultClassName);
|
||||
this.defaultClass = classes.get(slug);
|
||||
}
|
||||
|
||||
// Blocks and pets
|
||||
|
||||
Reference in New Issue
Block a user