Put default settings for command desc and parameters back in

These should work now. No infinite loop.
This commit is contained in:
tastybento 2018-08-03 17:43:42 -07:00
parent 3e7307a56c
commit 7aa2f33eab
2 changed files with 9 additions and 8 deletions

View File

@ -201,5 +201,5 @@
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots</url>
</repository>
</repositories>
<version>FC-0.8</version>
<version>FC-0.9</version>
</project>

View File

@ -167,14 +167,15 @@ public abstract class CompositeCommand extends Command implements PluginIdentifi
StringBuilder reference = new StringBuilder();
reference.append("commands");
/*
for (CompositeCommand p = this ; p != null && p != this; p = getParent()) {
reference = "." + p.getLabel() + reference;
CompositeCommand p = this;
int index = 0;
while (p.getParent() != null && index < 20) {
reference.append(".").append(p.getParent().getLabel());
p = p.getParent();
index++;
}
*/
setDescription(reference + ".description");
setParameters(reference + ".parameters");
setDescription(reference.toString() + ".description");
setParameters(reference.toString() + ".parameters");
setup();
// If this command does not define its own help class, then use the default help command