diff options
-rw-r--r-- | Essentials/src/net/ess3/commands/Commandbroadcast.java | 18 | ||||
-rw-r--r-- | Essentials/src/plugin.yml | 2 |
2 files changed, 17 insertions, 3 deletions
diff --git a/Essentials/src/net/ess3/commands/Commandbroadcast.java b/Essentials/src/net/ess3/commands/Commandbroadcast.java index 52854ce87..4519eef86 100644 --- a/Essentials/src/net/ess3/commands/Commandbroadcast.java +++ b/Essentials/src/net/ess3/commands/Commandbroadcast.java @@ -1,19 +1,33 @@ package net.ess3.commands; -import static net.ess3.I18n._; +import net.ess3.api.IUser; import net.ess3.utils.FormatUtil; +import org.bukkit.command.Command; import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; + +import static net.ess3.I18n._; public class Commandbroadcast extends EssentialsCommand { @Override + public void run(final IUser user, final String commandLabel, final String[] args) throws Exception + { + if (args.length < 1) + { + throw new NotEnoughArgumentsException(); + } + ess.broadcastMessage(null, _("§r§6[§4Broadcast§6]§a {0}", FormatUtil.replaceFormat(getFinalArg(args, 0)), user.getPlayer().getDisplayName())); + } + + @Override public void run(final CommandSender sender, final String commandLabel, final String[] args) throws Exception { if (args.length < 1) { throw new NotEnoughArgumentsException(); } - ess.broadcastMessage(null, _("§r§6[§4Broadcast§6]§a {0}", FormatUtil.replaceFormat(getFinalArg(args, 0)))); + ess.broadcastMessage(null, _("§r§6[§4Broadcast§6]§a {0}", FormatUtil.replaceFormat(getFinalArg(args, 0)), sender.getName())); } } diff --git a/Essentials/src/plugin.yml b/Essentials/src/plugin.yml index a35fe7db2..fc62ac9cd 100644 --- a/Essentials/src/plugin.yml +++ b/Essentials/src/plugin.yml @@ -50,7 +50,7 @@ commands: broadcast: description: Broadcasts a message to the entire server. usage: /<command> <msg> - aliases: [ebroadcast,bcast,ebcast] + aliases: [ebroadcast,bcast,ebcast,shout,eshout,bc,ebc] bigtree: description: Spawn a big tree where you are looking. usage: /<command> <tree|redwood|jungle> |