47 lines
1.4 KiB
Java
47 lines
1.4 KiB
Java
|
package mineplex.hub.commands;
|
||
|
|
||
|
import org.bukkit.entity.Player;
|
||
|
|
||
|
import mineplex.core.command.CommandBase;
|
||
|
import mineplex.core.common.Rank;
|
||
|
import mineplex.core.common.util.C;
|
||
|
import mineplex.core.common.util.F;
|
||
|
import mineplex.core.common.util.UtilPlayer;
|
||
|
import mineplex.hub.HubManager;
|
||
|
import mineplex.hub.modules.NewsManager;
|
||
|
|
||
|
public class NewsCommand extends CommandBase<HubManager>
|
||
|
{
|
||
|
public NewsCommand(HubManager plugin)
|
||
|
{
|
||
|
super(plugin, Rank.ADMIN, "news");
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public void Execute(Player caller, String[] args)
|
||
|
{
|
||
|
NewsManager blorp = Plugin.GetNewsManager();
|
||
|
|
||
|
if (args.length == 1 && args[0].equalsIgnoreCase("list"))
|
||
|
{
|
||
|
UtilPlayer.message(caller, F.main(Plugin.GetName(), C.cGray + "Current server news messages will be listed here..."));
|
||
|
}
|
||
|
else if (args.length == 2)
|
||
|
{
|
||
|
if (args[0].equalsIgnoreCase("add"))
|
||
|
{
|
||
|
UtilPlayer.message(caller, F.main(Plugin.GetName(), C.cGray + "This is where future messages like, '" + C.cGold + args[1] + "' will be added to server news!"));
|
||
|
}
|
||
|
else if (args[0].equalsIgnoreCase("delete"))
|
||
|
{
|
||
|
UtilPlayer.message(caller, F.main(Plugin.GetName(), C.cGray + "This is where future messages at positions like, " + C.cGold + "'News Position: " + C.cGold + args[1] + "'" + C.cGray + " will be removed from server news!"));
|
||
|
}
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
UtilPlayer.message(caller, F.main(Plugin.GetName(), C.cRed + "Your arguments are inappropriate for this command!"));
|
||
|
return;
|
||
|
}
|
||
|
}
|
||
|
}
|