Broadcast setnexts to admin chat
This commit is contained in:
parent
dab61936b4
commit
7ed61a0984
|
@ -12,6 +12,7 @@ import org.bukkit.ChatColor;
|
|||
import org.bukkit.command.CommandSender;
|
||||
import java.time.Duration;
|
||||
import tc.oc.api.docs.virtual.ServerDoc;
|
||||
import tc.oc.commons.bukkit.channels.admin.AdminChannel;
|
||||
import tc.oc.commons.core.commands.Commands;
|
||||
import tc.oc.commons.core.commands.TranslatableCommandException;
|
||||
import tc.oc.commons.core.restart.RestartManager;
|
||||
|
@ -36,10 +37,12 @@ public class AdminCommands implements Commands {
|
|||
|
||||
private final RestartManager restartManager;
|
||||
private final RestartListener restartListener;
|
||||
private final AdminChannel adminChannel;
|
||||
|
||||
@Inject AdminCommands(RestartManager restartManager, RestartListener restartListener) {
|
||||
@Inject AdminCommands(RestartManager restartManager, RestartListener restartListener, AdminChannel adminChannel) {
|
||||
this.restartManager = restartManager;
|
||||
this.restartListener = restartListener;
|
||||
this.adminChannel = adminChannel;
|
||||
}
|
||||
|
||||
@Command(
|
||||
|
@ -146,6 +149,7 @@ public class AdminCommands implements Commands {
|
|||
sender.sendMessage(ChatColor.GREEN + PGMTranslations.get().t("command.admin.cancelRestart.restartUnqueued", sender));
|
||||
}
|
||||
sender.sendMessage(ChatColor.DARK_PURPLE + PGMTranslations.get().t("command.admin.set.success", sender, ChatColor.GOLD + mm.getNextMap().getInfo().name + ChatColor.DARK_PURPLE));
|
||||
adminChannel.sendMessage(sender.getName() + ChatColor.RESET + " set the next map to " + ChatColor.YELLOW + mm.getNextMap().getInfo().name);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue