mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2025-07-01 04:26:42 +00:00
Compare commits
20 Commits
Author | SHA1 | Date | |
---|---|---|---|
e5902fc5e8 | |||
71862d6e41 | |||
7dffea0ba2 | |||
67c09546f7 | |||
8b51fd215f | |||
275204fb2e | |||
1330d2b3af | |||
4204210f66 | |||
8297d03a86 | |||
75353ae4b1 | |||
a28959db0e | |||
c42bc23bfe | |||
e29d4673dd | |||
2ce7e518fb | |||
9ba316464e | |||
60f71c9dfc | |||
3e71286507 | |||
6d48c90d16 | |||
d7ed667b89 | |||
9c61cc2768 |
@ -21,6 +21,9 @@ For those who wish to contribute, we encourage you to fork the repository and su
|
||||
* Make sure your changes build (<b>and work!</b>).
|
||||
|
||||
## Tips - How To Get Your Pull Request Accepted ##
|
||||
* See this picture for help:
|
||||

|
||||
|
||||
* Make sure your changes work and compile without difficulty.
|
||||
* Make sure your change adds something useful, do not add commands to micromanage the server. (ie: Shorthands for a collection of commands)
|
||||
* __Commands that make use of `org.bukkit.Server.dispatchCommand()` will probably be rejected.__
|
||||
|
@ -1,3 +1,3 @@
|
||||
#Build Number for ANT. Do not edit!
|
||||
#Tue Dec 17 15:17:32 CET 2013
|
||||
build.number=681
|
||||
#Tue Jan 14 20:43:15 CET 2014
|
||||
build.number=698
|
||||
|
@ -1,4 +1,4 @@
|
||||
# TotalFreedomMod v3.4 Configuration
|
||||
# TotalFreedomMod v3.5 Configuration
|
||||
# by Madgeek1450 and DarthSalamon
|
||||
|
||||
# Block placement prevention:
|
||||
@ -78,7 +78,6 @@ blocked_commands:
|
||||
# Superadmin commands - Auto-eject
|
||||
- 's:a:/stop'
|
||||
- 's:a:/reload'
|
||||
- 's:a:/nuke'
|
||||
- 's:a:/save-all'
|
||||
- 's:a:/save-on'
|
||||
- 's:a:/save-off'
|
||||
|
@ -3,6 +3,7 @@ package me.StevenLawson.TotalFreedomMod.Commands;
|
||||
import me.StevenLawson.TotalFreedomMod.TFM_ServerInterface;
|
||||
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -30,6 +31,18 @@ public class Command_tban extends TFM_Command
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// strike with lightning effect:
|
||||
final Location targetPos = player.getLocation();
|
||||
for (int x = -1; x <= 1; x++)
|
||||
{
|
||||
for (int z = -1; z <= 1; z++)
|
||||
{
|
||||
final Location strike_pos = new Location(targetPos.getWorld(), targetPos.getBlockX() + x, targetPos.getBlockY(), targetPos.getBlockZ() + z);
|
||||
targetPos.getWorld().strikeLightning(strike_pos);
|
||||
}
|
||||
}
|
||||
|
||||
TFM_Util.adminAction(sender.getName(), "Tempbanning: " + player.getName() + " for 5 minutes.", true);
|
||||
TFM_ServerInterface.banUsername(player.getName(), ChatColor.RED + "You have been temporarily banned for 5 minutes.", sender.getName(), TFM_Util.parseDateOffset("5m"));
|
||||
player.kickPlayer(ChatColor.RED + "You have been temporarily banned for five minutes. Please read totalfreedom.me for more info.");
|
||||
|
@ -10,6 +10,7 @@ import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.Location;
|
||||
|
||||
@CommandPermissions(level = AdminLevel.SUPER, source = SourceType.BOTH)
|
||||
@CommandParameters(description = "Temporarily ban someone.", usage = "/<command> [playername] [duration] [reason]")
|
||||
@ -56,6 +57,18 @@ public class Command_tempban extends TFM_Command
|
||||
bcast_msg.append(", Reason: \"").append(ban_reason).append("\"");
|
||||
}
|
||||
|
||||
|
||||
// strike with lightning effect:
|
||||
final Location targetPos = player.getLocation();
|
||||
for (int x = -1; x <= 1; x++)
|
||||
{
|
||||
for (int z = -1; z <= 1; z++)
|
||||
{
|
||||
final Location strike_pos = new Location(targetPos.getWorld(), targetPos.getBlockX() + x, targetPos.getBlockY(), targetPos.getBlockZ() + z);
|
||||
targetPos.getWorld().strikeLightning(strike_pos);
|
||||
}
|
||||
}
|
||||
|
||||
TFM_Util.adminAction(sender.getName(), bcast_msg.toString(), true);
|
||||
TFM_ServerInterface.banUsername(player.getName(), ban_reason, sender.getName(), ban_duration);
|
||||
TFM_ServerInterface.banIP(player.getAddress().getAddress().getHostAddress().trim(), ban_reason, sender.getName(), ban_duration);
|
||||
|
@ -0,0 +1,94 @@
|
||||
package me.StevenLawson.TotalFreedomMod.HTTPD;
|
||||
|
||||
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
||||
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.json.simple.JSONArray;
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
public class Module_players extends TFM_HTTPD_Module
|
||||
{
|
||||
public Module_players(NanoHTTPD.HTTPSession session)
|
||||
{
|
||||
super(session);
|
||||
}
|
||||
|
||||
@Override
|
||||
public NanoHTTPD.Response getResponse()
|
||||
{
|
||||
final JSONObject responseObject = new JSONObject();
|
||||
|
||||
final JSONArray players = new JSONArray();
|
||||
final JSONArray superadmins = new JSONArray();
|
||||
final JSONArray telnetadmins = new JSONArray();
|
||||
final JSONArray senioradmins = new JSONArray();
|
||||
final JSONArray developers = new JSONArray();
|
||||
|
||||
// All online players
|
||||
for (Player player : TotalFreedomMod.server.getOnlinePlayers())
|
||||
{
|
||||
players.add(player.getName());
|
||||
}
|
||||
|
||||
// Super admins (non-telnet and non-senior)
|
||||
for (String superadmin : TFM_SuperadminList.getSuperadminNames())
|
||||
{
|
||||
if (TFM_SuperadminList.getSenioradminNames().contains(superadmin))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (TFM_SuperadminList.getTelnetadminNames().contains(superadmin))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
superadmins.add(getName(superadmin));
|
||||
}
|
||||
|
||||
// Telnet admins (non-senior)
|
||||
for (String telnetadmin : TFM_SuperadminList.getTelnetadminNames())
|
||||
{
|
||||
if (TFM_SuperadminList.getSenioradminNames().contains(telnetadmin))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
telnetadmins.add(getName(telnetadmin));
|
||||
}
|
||||
|
||||
// Senior admins
|
||||
for (String senioradmin : TFM_SuperadminList.getSenioradminNames())
|
||||
{
|
||||
senioradmins.add(getName(senioradmin));
|
||||
}
|
||||
|
||||
// Developers
|
||||
developers.addAll(TFM_Util.DEVELOPERS);
|
||||
|
||||
responseObject.put("players", players);
|
||||
responseObject.put("superadmins", superadmins);
|
||||
responseObject.put("telnetadmins", telnetadmins);
|
||||
responseObject.put("senioradmins", senioradmins);
|
||||
responseObject.put("developers", developers);
|
||||
|
||||
final NanoHTTPD.Response response = new NanoHTTPD.Response(NanoHTTPD.Response.Status.OK, NanoHTTPD.MIME_JSON, responseObject.toString());
|
||||
response.addHeader("Access-Control-Allow-Origin", "*");
|
||||
return response;
|
||||
}
|
||||
|
||||
private String getName(String caseInsensitiveName)
|
||||
{
|
||||
final OfflinePlayer player = Bukkit.getOfflinePlayer(caseInsensitiveName);
|
||||
if (player == null)
|
||||
{
|
||||
return caseInsensitiveName;
|
||||
}
|
||||
else
|
||||
{
|
||||
return player.getName();
|
||||
}
|
||||
}
|
||||
}
|
@ -62,6 +62,12 @@ public abstract class NanoHTTPD
|
||||
* Common mime type for dynamic content: html
|
||||
*/
|
||||
public static final String MIME_HTML = "text/html";
|
||||
// TFM Start
|
||||
/**
|
||||
* Common mime type for dynamic content: json
|
||||
*/
|
||||
public static final String MIME_JSON = "application/json";
|
||||
// TFM End
|
||||
/**
|
||||
* Pseudo-Parameter to use to store the actual query string in the parameters map for later re-processing.
|
||||
*/
|
||||
|
@ -117,6 +117,14 @@ public class TFM_HTTPD_Manager
|
||||
{
|
||||
return new Module_permbans(session).getResponse();
|
||||
}
|
||||
}),
|
||||
PLAYERS(new ModuleExecutable(true, "players")
|
||||
{
|
||||
@Override
|
||||
public Response getResponse(HTTPSession session)
|
||||
{
|
||||
return new Module_players(session).getResponse();
|
||||
}
|
||||
});
|
||||
//
|
||||
private final ModuleExecutable moduleExecutable;
|
||||
|
@ -537,6 +537,9 @@ public class TFM_PlayerListener implements Listener
|
||||
// Finally, set message
|
||||
event.setMessage(message);
|
||||
|
||||
// Broadcast it to console (since 1.7 doesn't do that anymore)
|
||||
TFM_Log.info(String.format(event.getFormat(), player.getDisplayName(), event.getMessage()), true);
|
||||
|
||||
// Set the tag
|
||||
if (playerdata.getTag() != null)
|
||||
{
|
||||
@ -657,6 +660,9 @@ public class TFM_PlayerListener implements Listener
|
||||
playerdata.regenerateHistory();
|
||||
playerdata.clearHistory();
|
||||
}
|
||||
|
||||
// Log player quitting, because 1.7 doesn't do this
|
||||
TFM_Log.info(player.getName() + " left the game.");
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.MONITOR)
|
||||
@ -685,6 +691,9 @@ public class TFM_PlayerListener implements Listener
|
||||
final TFM_PlayerData playerdata = TFM_PlayerData.getPlayerData(player);
|
||||
playerdata.setSuperadminIdVerified(null);
|
||||
|
||||
// Log join message, as 1.7 doesn't log it anymore
|
||||
TFM_Log.info(player.getName() + " joined the game.");
|
||||
|
||||
TFM_UserList.getInstance(TotalFreedomMod.plugin).addUser(player);
|
||||
|
||||
final boolean impostor = TFM_SuperadminList.isSuperadminImpostor(player);
|
||||
|
@ -1,24 +1,17 @@
|
||||
package me.StevenLawson.TotalFreedomMod.Listener;
|
||||
|
||||
import java.util.Set;
|
||||
import me.StevenLawson.TotalFreedomMod.TFM_CommandBlocker;
|
||||
import me.StevenLawson.TotalFreedomMod.TFM_ConfigEntry;
|
||||
import me.StevenLawson.TotalFreedomMod.TFM_ServerInterface;
|
||||
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Server;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.server.RemoteServerCommandEvent;
|
||||
import org.bukkit.event.server.ServerCommandEvent;
|
||||
import org.bukkit.event.server.ServerListPingEvent;
|
||||
import org.bukkit.permissions.Permission;
|
||||
import org.bukkit.permissions.PermissionAttachment;
|
||||
import org.bukkit.permissions.PermissionAttachmentInfo;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
public class TFM_ServerListener implements Listener
|
||||
{
|
||||
@ -57,6 +50,7 @@ public class TFM_ServerListener implements Listener
|
||||
}
|
||||
}
|
||||
}*/
|
||||
@Deprecated // Moved to TFM_TelnetListener
|
||||
@EventHandler(priority = EventPriority.NORMAL)
|
||||
public void onRemoteServerCommand(RemoteServerCommandEvent event)
|
||||
{
|
||||
@ -66,6 +60,7 @@ public class TFM_ServerListener implements Listener
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated // Moved to TFM_TelnetListener
|
||||
@EventHandler(priority = EventPriority.NORMAL)
|
||||
public void onServerCommand(ServerCommandEvent event)
|
||||
{
|
||||
@ -97,111 +92,4 @@ public class TFM_ServerListener implements Listener
|
||||
event.setMotd(ChatColor.RED + "Server is full.");
|
||||
}
|
||||
}
|
||||
|
||||
private static class TFM_ServerListener_DummyCommandSender implements CommandSender
|
||||
{
|
||||
private final String senderName;
|
||||
|
||||
public TFM_ServerListener_DummyCommandSender(String senderName)
|
||||
{
|
||||
this.senderName = senderName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendMessage(String message)
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendMessage(String[] messages)
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public Server getServer()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName()
|
||||
{
|
||||
return senderName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPermissionSet(String name)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPermissionSet(Permission perm)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasPermission(String name)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasPermission(Permission perm)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PermissionAttachment addAttachment(Plugin plugin, String name, boolean value)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PermissionAttachment addAttachment(Plugin plugin)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PermissionAttachment addAttachment(Plugin plugin, String name, boolean value, int ticks)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PermissionAttachment addAttachment(Plugin plugin, int ticks)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeAttachment(PermissionAttachment attachment)
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void recalculatePermissions()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<PermissionAttachmentInfo> getEffectivePermissions()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOp()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setOp(boolean value)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
package me.StevenLawson.TotalFreedomMod.Listener;
|
||||
|
||||
import me.StevenLawson.TotalFreedomMod.TFM_Log;
|
||||
import me.StevenLawson.TotalFreedomMod.TFM_CommandBlocker;
|
||||
import me.StevenLawson.TotalFreedomMod.TFM_Superadmin;
|
||||
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
||||
import org.bukkit.Bukkit;
|
||||
@ -9,7 +9,7 @@ import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.Listener;
|
||||
|
||||
public class TFM_CustomListener implements Listener
|
||||
public class TFM_TelnetListener implements Listener
|
||||
{
|
||||
@EventHandler(priority = EventPriority.NORMAL)
|
||||
public void onTelnetPreLogin(me.StevenLawson.BukkitTelnet.TelnetPreLoginEvent event)
|
||||
@ -39,4 +39,13 @@ public class TFM_CustomListener implements Listener
|
||||
|
||||
event.setName(player.getName());
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.NORMAL)
|
||||
public void onTelnetCommand(me.StevenLawson.BukkitTelnet.TelnetCommandEvent event)
|
||||
{
|
||||
if (TFM_CommandBlocker.getInstance().isCommandBlocked(event.getCommand(), event.getSender()))
|
||||
{
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
}
|
@ -14,14 +14,13 @@ import org.bukkit.entity.Player;
|
||||
|
||||
public class TFM_CommandBlocker
|
||||
{
|
||||
private Map<String, TFM_CommandBlocker_BlockedCommandEntry> blockedCommands = new HashMap<String, TFM_CommandBlocker_BlockedCommandEntry>();
|
||||
private Map<String, CommandBlockerEntry> blockedCommands = new HashMap<String, CommandBlockerEntry>();
|
||||
|
||||
private TFM_CommandBlocker()
|
||||
{
|
||||
parseBlockingRules();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public final void parseBlockingRules()
|
||||
{
|
||||
blockedCommands.clear();
|
||||
@ -83,7 +82,7 @@ public class TFM_CommandBlocker
|
||||
message = parts[3];
|
||||
}
|
||||
|
||||
TFM_CommandBlocker_BlockedCommandEntry blockedCommandEntry = new TFM_CommandBlocker_BlockedCommandEntry(rank, action, command, message);
|
||||
CommandBlockerEntry blockedCommandEntry = new CommandBlockerEntry(rank, action, command, message);
|
||||
|
||||
Command bukkitCommand = commandMap.getCommand(command);
|
||||
if (bukkitCommand == null)
|
||||
@ -137,7 +136,7 @@ public class TFM_CommandBlocker
|
||||
return false;
|
||||
}
|
||||
|
||||
TFM_CommandBlocker_BlockedCommandEntry blockedCommandEntry = blockedCommands.get(command);
|
||||
final CommandBlockerEntry blockedCommandEntry = blockedCommands.get(command);
|
||||
|
||||
if (blockedCommandEntry != null)
|
||||
{
|
||||
@ -224,7 +223,9 @@ public class TFM_CommandBlocker
|
||||
|
||||
private enum CommandBlockerAction
|
||||
{
|
||||
BLOCK("b"), BLOCK_AND_EJECT("a"), BLOCK_UNKNOWN("u");
|
||||
BLOCK("b"),
|
||||
BLOCK_AND_EJECT("a"),
|
||||
BLOCK_UNKNOWN("u");
|
||||
private final String token;
|
||||
|
||||
private CommandBlockerAction(String token)
|
||||
@ -250,14 +251,14 @@ public class TFM_CommandBlocker
|
||||
}
|
||||
}
|
||||
|
||||
private static class TFM_CommandBlocker_BlockedCommandEntry
|
||||
private static class CommandBlockerEntry
|
||||
{
|
||||
private final CommandBlockerRank rank;
|
||||
private final CommandBlockerAction action;
|
||||
private String command;
|
||||
private final String message;
|
||||
|
||||
public TFM_CommandBlocker_BlockedCommandEntry(CommandBlockerRank rank, CommandBlockerAction action, String command, String message)
|
||||
public CommandBlockerEntry(CommandBlockerRank rank, CommandBlockerAction action, String command, String message)
|
||||
{
|
||||
this.rank = rank;
|
||||
this.action = action;
|
||||
@ -321,10 +322,10 @@ public class TFM_CommandBlocker
|
||||
|
||||
public static TFM_CommandBlocker getInstance()
|
||||
{
|
||||
return TFM_CommandBlockerNewHolder.INSTANCE;
|
||||
return TFM_CommandBlockerHolder.INSTANCE;
|
||||
}
|
||||
|
||||
private static class TFM_CommandBlockerNewHolder
|
||||
private static class TFM_CommandBlockerHolder
|
||||
{
|
||||
private static final TFM_CommandBlocker INSTANCE = new TFM_CommandBlocker();
|
||||
}
|
||||
|
@ -21,10 +21,11 @@ import org.bukkit.util.FileUtil;
|
||||
|
||||
public class TFM_SuperadminList
|
||||
{
|
||||
private static Map<String, TFM_Superadmin> superadminList = new HashMap<String, TFM_Superadmin>();
|
||||
private static final Map<String, TFM_Superadmin> superadminList = new HashMap<String, TFM_Superadmin>();
|
||||
private static List<String> superadminNames = new ArrayList<String>();
|
||||
private static List<String> senioradminNames = new ArrayList<String>();
|
||||
private static List<String> telnetadminNames = new ArrayList<String>();
|
||||
private static List<String> superadminIPs = new ArrayList<String>();
|
||||
private static List<String> seniorAdminNames = new ArrayList<String>();
|
||||
private static int cleanThreshold = 24 * 7; // 1 Week in hours
|
||||
|
||||
private TFM_SuperadminList()
|
||||
@ -42,6 +43,16 @@ public class TFM_SuperadminList
|
||||
return superadminNames;
|
||||
}
|
||||
|
||||
public static List<String> getTelnetadminNames()
|
||||
{
|
||||
return telnetadminNames;
|
||||
}
|
||||
|
||||
public static List<String> getSenioradminNames()
|
||||
{
|
||||
return senioradminNames;
|
||||
}
|
||||
|
||||
public static void loadSuperadminList()
|
||||
{
|
||||
try
|
||||
@ -86,20 +97,21 @@ public class TFM_SuperadminList
|
||||
public static void updateIndexLists()
|
||||
{
|
||||
superadminNames.clear();
|
||||
telnetadminNames.clear();
|
||||
senioradminNames.clear();
|
||||
superadminIPs.clear();
|
||||
seniorAdminNames.clear();
|
||||
|
||||
Iterator<Entry<String, TFM_Superadmin>> it = superadminList.entrySet().iterator();
|
||||
while (it.hasNext())
|
||||
{
|
||||
Entry<String, TFM_Superadmin> pair = it.next();
|
||||
|
||||
String admin_name = pair.getKey().toLowerCase();
|
||||
String name = pair.getKey().toLowerCase();
|
||||
TFM_Superadmin superadmin = pair.getValue();
|
||||
|
||||
if (superadmin.isActivated())
|
||||
{
|
||||
superadminNames.add(admin_name);
|
||||
superadminNames.add(name);
|
||||
|
||||
for (String ip : superadmin.getIps())
|
||||
{
|
||||
@ -108,19 +120,25 @@ public class TFM_SuperadminList
|
||||
|
||||
if (superadmin.isSeniorAdmin())
|
||||
{
|
||||
seniorAdminNames.add(admin_name);
|
||||
senioradminNames.add(name);
|
||||
|
||||
for (String console_alias : superadmin.getConsoleAliases())
|
||||
{
|
||||
seniorAdminNames.add(console_alias.toLowerCase());
|
||||
senioradminNames.add(console_alias.toLowerCase());
|
||||
}
|
||||
}
|
||||
|
||||
if (superadmin.isTelnetAdmin())
|
||||
{
|
||||
telnetadminNames.add(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
superadminNames = TFM_Util.removeDuplicates(superadminNames);
|
||||
telnetadminNames = TFM_Util.removeDuplicates(telnetadminNames);
|
||||
senioradminNames = TFM_Util.removeDuplicates(senioradminNames);
|
||||
superadminIPs = TFM_Util.removeDuplicates(superadminIPs);
|
||||
seniorAdminNames = TFM_Util.removeDuplicates(seniorAdminNames);
|
||||
|
||||
TFM_AdminWorld.getInstance().wipeAccessCache();
|
||||
}
|
||||
@ -264,7 +282,7 @@ public class TFM_SuperadminList
|
||||
|
||||
if (!(user instanceof Player))
|
||||
{
|
||||
return seniorAdminNames.contains(username);
|
||||
return senioradminNames.contains(username);
|
||||
}
|
||||
|
||||
TFM_Superadmin entry = getAdminEntry((Player) user);
|
||||
|
@ -406,7 +406,7 @@ public class TFM_Util
|
||||
//p.setBanned(true);
|
||||
TFM_ServerInterface.banUsername(player.getName(), kickMessage, "AutoEject", null);
|
||||
|
||||
TFM_Util.bcastMsg(ChatColor.RED + player.getName() + " has been banned permanently.");
|
||||
TFM_Util.bcastMsg(ChatColor.RED + player.getName() + " has been banned.");
|
||||
|
||||
player.kickPlayer(kickMessage);
|
||||
|
||||
|
@ -3,7 +3,12 @@ package me.StevenLawson.TotalFreedomMod;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import me.StevenLawson.TotalFreedomMod.Commands.TFM_Command;
|
||||
import me.StevenLawson.TotalFreedomMod.Commands.TFM_CommandLoader;
|
||||
import me.StevenLawson.TotalFreedomMod.HTTPD.TFM_HTTPD_Manager;
|
||||
@ -309,7 +314,7 @@ public class TotalFreedomMod extends JavaPlugin
|
||||
pm.registerEvents(new TFM_PlayerListener(), plugin);
|
||||
pm.registerEvents(new TFM_WeatherListener(), plugin);
|
||||
pm.registerEvents(new TFM_ServerListener(), plugin);
|
||||
pm.registerEvents(new TFM_CustomListener(), plugin);
|
||||
pm.registerEvents(new TFM_TelnetListener(), plugin);
|
||||
}
|
||||
|
||||
private static void setAppProperties()
|
||||
|
@ -1,6 +1,6 @@
|
||||
name: TotalFreedomMod
|
||||
main: me.StevenLawson.TotalFreedomMod.TotalFreedomMod
|
||||
version: 3.4
|
||||
version: 3.5
|
||||
description: Plugin for the Total Freedom server.
|
||||
authors: [Madgeek1450, DarthSalamon]
|
||||
|
||||
|
Reference in New Issue
Block a user