package com.skcraft.plume.module;

import com.sk89q.intake.Command;
import com.sk89q.intake.Require;
import com.sk89q.intake.parametric.annotation.Switch;
import com.sk89q.intake.parametric.annotation.Text;
import com.skcraft.plume.command.Sender;
import com.skcraft.plume.common.util.module.Module;
import com.skcraft.plume.util.Messages;
import net.minecraft.command.ICommandSender;

import static com.skcraft.plume.common.util.SharedLocale.tr;

@Module(name = "broadcast", desc = "Server wide message broadcasting for operators")
public class Broadcast {

    @Command(aliases = {"broadcast", "bc"}, desc = "Send out a broadcast message")
    @Require("plume.broadcast.bc")
    public void broadcast(@Sender ICommandSender sender, @Text String msg, @Switch('t') String type) {
        if (type == null || type.equalsIgnoreCase("type")) {
            Messages.broadcastInfo(msg);
        } else if (type.equalsIgnoreCase("alert")) {
            Messages.broadcastAlert(msg);
        } else {
            sender.addChatMessage(Messages.error(tr("broadcast.invalidType")));
        }
    }

}

@@ -98,62 +98,8 @@
 re;%0A
-import com.sk89q.intake.parametric.annotation.Switch;%0A
 impo
@@ -146,16 +146,16 @@
 n.Text;%0A
+
 import c
@@ -328,68 +328,51 @@
 er;%0A
-%0A
 import 
-static com.skcraft.plume.common
+net.minecraft
 .util.
-SharedLocale.tr
+ChatComponentText
 ;%0A%0A@
@@ -595,17 +595,24 @@
 adcast.b
-c
+roadcast
 %22)%0A    p
@@ -683,341 +683,584 @@
  msg
-, @Switch('t') String type) %7B%0A        if (type == null %7C%7C type.equalsIgnoreCase(%22type%22)) %7B%0A            Messages.broadcastInfo(msg);%0A        %7D else if (type.equalsIgnoreCase(%22alert%22)) %7B%0A            Messages.broadcastAlert(
+) %7B%0A        Messages.broadcast(Messages.info(%22SERVER: %22 + msg));%0A    %7D%0A%0A    @Command(aliases = %7B%22alert%22%7D, desc = %22Send out a broadcast message%22)%0A    @Require(%22plume.broadcast.broadcast%22)%0A    public void alert(@Sender ICommandSender sender, @Text String msg) %7B%0A        Messages.broadcast(Messages.error(%22SERVER: %22 + 
 msg)
+)
 ;%0A    
+%7D%0A%0A
     
-%7D else %7B%0A            sender.addChatMessage(Messages.error(tr(%22broadcast.invalidType%22)));%0A        %7D
+@Command(aliases = %7B%22print%22%7D, desc = %22Print an unformatted message to chat%22)%0A    @Require(%22plume.broadcast.print%22)%0A    public void print(@Sender ICommandSender sender, @Text String msg) %7B%0A        Messages.broadcast(new ChatComponentText(msg));
 %0A   

Make the broadcast module more versatile.