mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2024-12-22 04:37:42 +01:00
Quick fix
This commit is contained in:
parent
5f1e32d581
commit
c342b4add2
@ -200,7 +200,7 @@ public class StatManager {
|
||||
}
|
||||
|
||||
private void registerCustomStat(@NotNull ConfigurationSection section) {
|
||||
final String name = section.getString("name");
|
||||
String name = section.getString("name");
|
||||
final String type = section.getString("type");
|
||||
|
||||
Validate.notNull(section, "Cannot register a custom stat from a null section");
|
||||
@ -234,6 +234,9 @@ public class StatManager {
|
||||
else if (section.isString("lore"))
|
||||
lore = new String[]{section.getString("lore")};
|
||||
|
||||
// Format name
|
||||
name = name.replace(" ", "_").replace("-", "_").toUpperCase();
|
||||
|
||||
// Create a new stat instance
|
||||
try {
|
||||
ItemStat<?, ?> stat = statClass.getConstructor(String.class, Material.class, String.class, String[].class, String[].class, Material[].class)
|
||||
|
Loading…
Reference in New Issue
Block a user