mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-27 01:05:38 +00:00
Tweak Wilee's changes to /onlinemode.
This commit is contained in:
parent
adbc658cc7
commit
7b59350833
@ -1,5 +1,5 @@
|
||||
#Sat, 14 Sep 2013 21:58:26 -0400
|
||||
#Tue, 17 Sep 2013 12:03:45 -0400
|
||||
|
||||
program.VERSION=3.2
|
||||
program.BUILDNUM=594
|
||||
program.BUILDDATE=09/14/2013 09\:58 PM
|
||||
program.BUILDNUM=595
|
||||
program.BUILDDATE=09/17/2013 12\:03 PM
|
||||
|
@ -1,3 +1,3 @@
|
||||
#Build Number for ANT. Do not edit!
|
||||
#Sat Sep 14 21:58:26 EDT 2013
|
||||
build.number=595
|
||||
#Tue Sep 17 12:03:45 EDT 2013
|
||||
build.number=596
|
||||
|
@ -2,13 +2,15 @@ package me.StevenLawson.TotalFreedomMod.Commands;
|
||||
|
||||
import me.StevenLawson.TotalFreedomMod.TFM_Log;
|
||||
import me.StevenLawson.TotalFreedomMod.TFM_ServerInterface;
|
||||
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
||||
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@CommandPermissions(level = AdminLevel.SUPER, source = SourceType.BOTH, block_host_console = true)
|
||||
@CommandPermissions(level = AdminLevel.ALL, source = SourceType.BOTH)
|
||||
@CommandParameters(description = "Switch server online-mode on and off.", usage = "/<command> <on | off>")
|
||||
public class Command_onlinemode extends TFM_Command
|
||||
{
|
||||
@ -18,17 +20,18 @@ public class Command_onlinemode extends TFM_Command
|
||||
if (args.length < 1)
|
||||
{
|
||||
playerMsg("Server is currently running with 'online-mode=" + (server.getOnlineMode() ? "true" : "false") + "'.", ChatColor.WHITE);
|
||||
playerMsg("If you have Telnet, you can use \"/onlinemode on\" and \"/onlinemode off\" to change online mode.", ChatColor.WHITE);
|
||||
playerMsg("\"/onlinemode on\" and \"/onlinemode off\" can be used to change online mode from the console.", ChatColor.WHITE);
|
||||
}
|
||||
else
|
||||
{
|
||||
boolean online_mode;
|
||||
|
||||
if (sender instanceof Player && !TFM_SuperadminList.isSeniorAdmin(sender))
|
||||
if (sender instanceof Player && !TFM_SuperadminList.isSeniorAdmin(sender, true))
|
||||
{
|
||||
playerMsg(TotalFreedomMod.MSG_NO_PERMS);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (args[0].equalsIgnoreCase("on"))
|
||||
{
|
||||
online_mode = true;
|
||||
|
Loading…
Reference in New Issue
Block a user