Removed dependency to Craftbukkit and Spigot server code.

This breaks whitelist and onlinemode toggle.
This commit is contained in:
StevenLawson
2017-07-25 21:07:22 -04:00
parent e16714ea6c
commit 655d7471dc
6 changed files with 106 additions and 109 deletions

View File

@ -1,7 +1,6 @@
package me.totalfreedom.totalfreedommod.command;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FLog;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
@ -44,26 +43,27 @@ public class Command_onlinemode extends FreedomCommand
return false;
}
try
{
plugin.si.setOnlineMode(onlineMode);
if (onlineMode)
{
for (Player player : server.getOnlinePlayers())
{
player.kickPlayer("Server is activating \"online-mode=true\". Please reconnect.");
}
}
FUtil.adminAction(sender.getName(), "Turning player validation " + (onlineMode ? "on" : "off") + ".", true);
server.reload();
}
catch (Exception ex)
{
FLog.severe(ex);
}
// try
// {
// plugin.si.setOnlineMode(onlineMode);
//
// if (onlineMode)
// {
// for (Player player : server.getOnlinePlayers())
// {
// player.kickPlayer("Server is activating \"online-mode=true\". Please reconnect.");
// }
// }
//
// FUtil.adminAction(sender.getName(), "Turning player validation " + (onlineMode ? "on" : "off") + ".", true);
//
// server.reload();
// }
// catch (Exception ex)
// {
// FLog.severe(ex);
// }
FUtil.adminAction(sender.getName(), "Online-Mode toggling is temporarily disabled.", true);
}
return true;

View File

@ -158,8 +158,10 @@ public class Command_whitelist extends FreedomCommand
//purge
if (args[0].equalsIgnoreCase("purge"))
{
FUtil.adminAction(sender.getName(), "Removing all players from the whitelist.", false);
msg("Removed " + plugin.si.purgeWhitelist() + " players from the whitelist.");
// FUtil.adminAction(sender.getName(), "Removing all players from the whitelist.", false);
// msg("Removed " + plugin.si.purgeWhitelist() + " players from the whitelist.");
FUtil.adminAction(sender.getName(), "Whitelist purging is temporarily disabled.", true);
return true;
}