mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-06 14:46:32 +02:00
@@ -1,12 +1,26 @@
|
||||
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
|
||||
{
|
||||
@@ -14,6 +28,6 @@ public class Commandbroadcast extends EssentialsCommand
|
||||
{
|
||||
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()));
|
||||
}
|
||||
}
|
||||
|
@@ -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>
|
||||
|
Reference in New Issue
Block a user