Mson Help

This commit is contained in:
Olof Larsson 2016-02-29 23:36:23 +01:00
parent c5baf44e08
commit 2e019823d5
2 changed files with 7 additions and 6 deletions

View File

@ -3,6 +3,7 @@ package com.massivecraft.massivecore.command;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender; import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
@ -46,9 +47,9 @@ public class HelpCommand extends MassiveCommand
// Create Lines // Create Lines
List<Mson> lines = new ArrayList<Mson>(); List<Mson> lines = new ArrayList<Mson>();
for (String helpline : parent.getHelp()) for (Object helpline : parent.getHelp())
{ {
lines.add(Mson.parse("<a>#<i> " + helpline)); lines.add(mson(Mson.parse("<a># "), helpline).color(ChatColor.YELLOW));
} }
for (MassiveCommand child : parent.getChildren()) for (MassiveCommand child : parent.getChildren())

View File

@ -165,7 +165,7 @@ public class MassiveCommand implements Active, PluginIdentifiableCommand
protected String descPermission = null; protected String descPermission = null;
// Free text displayed at the top of the help command. // Free text displayed at the top of the help command.
protected List<String> help = new ArrayList<String>(); protected List<?> help = new ArrayList<>();
// The visibility of this command in help command. // The visibility of this command in help command.
protected Visibility visibility = Visibility.VISIBLE; protected Visibility visibility = Visibility.VISIBLE;
@ -769,9 +769,9 @@ public class MassiveCommand implements Active, PluginIdentifiableCommand
return null; return null;
} }
public void setHelp(List<String> val) { this.help = val; } public void setHelp(List<?> val) { this.help = val; }
public void setHelp(String... val) { this.help = Arrays.asList(val); } public void setHelp(Object... val) { this.help = Arrays.asList(val); }
public List<String> getHelp() { return this.help; } public List<?> getHelp() { return this.help; }
public Visibility getVisibility() { return this.visibility; } public Visibility getVisibility() { return this.visibility; }
public void setVisibility(Visibility visibility) { this.visibility = visibility; } public void setVisibility(Visibility visibility) { this.visibility = visibility; }