Changed FancyMessage.command() to accept command aliases.
Also adds support for servers where slash-less commands are disabled.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.FPlayer;
|
||||
import com.massivecraft.factions.FPlayers;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
@@ -24,7 +25,7 @@ public class CmdShowInvites extends FCommand {
|
||||
for (String id : myFaction.getInvites()) {
|
||||
FPlayer fp = FPlayers.getInstance().getById(id);
|
||||
String name = fp != null ? fp.getName() : id;
|
||||
msg.then(name + " ").color(ChatColor.WHITE).tooltip(TL.COMMAND_SHOWINVITES_CLICKTOREVOKE.format(name)).command("f deinvite " + name);
|
||||
msg.then(name + " ").color(ChatColor.WHITE).tooltip(TL.COMMAND_SHOWINVITES_CLICKTOREVOKE.format(name)).command(Conf.baseCommandAliases.get(0) + " deinvite " + name);
|
||||
}
|
||||
|
||||
sendFancyMessage(msg);
|
||||
|
||||
Reference in New Issue
Block a user