Shallow copy the help command chain to not permanently disturb it with modification.
This commit is contained in:
parent
d375ccccb6
commit
1332ef414e
@ -266,8 +266,10 @@ public class MassiveCommand
|
|||||||
public void perform()
|
public void perform()
|
||||||
{
|
{
|
||||||
// Per default we just act as the help command!
|
// Per default we just act as the help command!
|
||||||
this.getCommandChain().add(this);
|
List<MassiveCommand> commandChain = new ArrayList<MassiveCommand>(this.getCommandChain());
|
||||||
HelpCommand.get().execute(this.sender, this.getArgs(), this.getCommandChain());
|
commandChain.add(this);
|
||||||
|
|
||||||
|
HelpCommand.get().execute(this.sender, this.getArgs(), commandChain);
|
||||||
}
|
}
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
@ -444,7 +446,7 @@ public class MassiveCommand
|
|||||||
|
|
||||||
public String getUseageTemplate(boolean addDesc)
|
public String getUseageTemplate(boolean addDesc)
|
||||||
{
|
{
|
||||||
return getUseageTemplate(this.commandChain, addDesc);
|
return getUseageTemplate(this.getCommandChain(), addDesc);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getUseageTemplate()
|
public String getUseageTemplate()
|
||||||
|
Loading…
Reference in New Issue
Block a user