Adjusts output of blacksmith setting messages
This commit is contained in:
@ -47,6 +47,7 @@ public enum NPCSetting {
|
||||
private final String childPath;
|
||||
private final Object value;
|
||||
private final String commandName;
|
||||
private final String nodeName;
|
||||
|
||||
/**
|
||||
* Instantiates a new setting
|
||||
@ -61,6 +62,11 @@ public enum NPCSetting {
|
||||
String[] pathParts = path.split("\\.");
|
||||
this.childPath = String.join(".", Arrays.copyOfRange(pathParts, 1, pathParts.length));
|
||||
this.commandName = commandName;
|
||||
if (pathParts.length > 0) {
|
||||
this.nodeName = pathParts[pathParts.length - 1];
|
||||
} else {
|
||||
this.nodeName = "";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -99,4 +105,13 @@ public enum NPCSetting {
|
||||
return commandName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the name of this configuration node
|
||||
*
|
||||
* @return <p>The name of this configuration node</p>
|
||||
*/
|
||||
public String getNodeName() {
|
||||
return nodeName;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user