From 73ee1f36243e1ba8dea21b77b3d70749061c48cc Mon Sep 17 00:00:00 2001
From: JeromSar
Date: Wed, 18 Feb 2015 19:24:04 +0100
Subject: [PATCH 01/10] Implement SuperAdmin service
---
.../StevenLawson/TotalFreedomMod/TFM_AdminList.java | 11 +++++++++++
.../StevenLawson/TotalFreedomMod/TotalFreedomMod.java | 5 +++++
2 files changed, 16 insertions(+)
diff --git a/src/me/StevenLawson/TotalFreedomMod/TFM_AdminList.java b/src/me/StevenLawson/TotalFreedomMod/TFM_AdminList.java
index 8cd7bd3..05d8343 100644
--- a/src/me/StevenLawson/TotalFreedomMod/TFM_AdminList.java
+++ b/src/me/StevenLawson/TotalFreedomMod/TFM_AdminList.java
@@ -1,5 +1,6 @@
package me.StevenLawson.TotalFreedomMod;
+import com.google.common.base.Function;
import com.google.common.collect.Sets;
import java.util.Collections;
import java.util.Date;
@@ -24,6 +25,7 @@ import org.bukkit.entity.Player;
public class TFM_AdminList
{
+ public static final Function SUPERADMIN_SERVICE;
private static final Map adminList;
private static final Set superUUIDs;
private static final Set telnetUUIDs;
@@ -40,6 +42,15 @@ public class TFM_AdminList
seniorUUIDs = new HashSet();
seniorConsoleNames = new HashSet();
superIps = new HashSet();
+
+ SUPERADMIN_SERVICE = new Function() {
+
+ @Override
+ public Boolean apply(Player f)
+ {
+ return isSuperAdmin(f);
+ }
+ };
}
private TFM_AdminList()
diff --git a/src/me/StevenLawson/TotalFreedomMod/TotalFreedomMod.java b/src/me/StevenLawson/TotalFreedomMod/TotalFreedomMod.java
index 8965ab1..ec29de4 100644
--- a/src/me/StevenLawson/TotalFreedomMod/TotalFreedomMod.java
+++ b/src/me/StevenLawson/TotalFreedomMod/TotalFreedomMod.java
@@ -1,5 +1,6 @@
package me.StevenLawson.TotalFreedomMod;
+import com.google.common.base.Function;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
@@ -25,6 +26,7 @@ import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.plugin.PluginManager;
+import org.bukkit.plugin.ServicePriority;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.scheduler.BukkitRunnable;
import org.mcstats.Metrics;
@@ -111,6 +113,9 @@ public class TotalFreedomMod extends JavaPlugin
TFM_ProtectedArea.autoAddSpawnpoints();
}
+ // Start SuperAdmin service
+ server.getServicesManager().register(Function.class, TFM_AdminList.SUPERADMIN_SERVICE, plugin, ServicePriority.Normal);
+
final PluginManager pm = server.getPluginManager();
pm.registerEvents(new TFM_EntityListener(), plugin);
pm.registerEvents(new TFM_BlockListener(), plugin);
From f4aa0c324cf0c340d5fee43e3bd3548e660880ab Mon Sep 17 00:00:00 2001
From: JeromSar
Date: Sat, 7 Mar 2015 17:32:27 +0100
Subject: [PATCH 02/10] Updated to new WorldEdit API TF-WorldEdit doesn't
depend on TFM anymore. It's event-based now. Moved TFM_TelnetListener to the
Bridge subpackage
---
buildnumber.properties | 4 +-
nbproject/project.properties | 6 +-
.../TFM_BukkitTelnetListener.java} | 5 +-
.../Bridge/TFM_WorldEditBridge.java | 68 ++-----------------
.../Bridge/TFM_WorldEditListener.java | 62 +++++++++++++++++
.../Commands/Command_setl.java | 4 +-
.../TotalFreedomMod/TotalFreedomMod.java | 8 ++-
7 files changed, 82 insertions(+), 75 deletions(-)
rename src/me/StevenLawson/TotalFreedomMod/{Listener/TFM_TelnetListener.java => Bridge/TFM_BukkitTelnetListener.java} (94%)
create mode 100644 src/me/StevenLawson/TotalFreedomMod/Bridge/TFM_WorldEditListener.java
diff --git a/buildnumber.properties b/buildnumber.properties
index 70d472a..aafeaa9 100644
--- a/buildnumber.properties
+++ b/buildnumber.properties
@@ -1,3 +1,3 @@
#Build Number for ANT. Do not edit!
-#Mon Feb 16 16:40:10 CET 2015
-build.number=982
+#Fri Feb 20 15:08:04 CET 2015
+build.number=984
diff --git a/nbproject/project.properties b/nbproject/project.properties
index cac29b1..2656919 100644
--- a/nbproject/project.properties
+++ b/nbproject/project.properties
@@ -48,10 +48,10 @@ jar.archive.disabled=${jnlp.enabled}
jar.compress=false
jar.index=${jnlp.enabled}
javac.classpath=\
- ${libs.WorldEdit.classpath}:\
- ${libs.Essentials.classpath}:\
+ ${libs.SpigotServer.classpath}:\
${libs.BukkitTelnet.classpath}:\
- ${libs.SpigotServer.classpath}
+ ${libs.TF-WorldEdit.classpath}:\
+ ${libs.Essentials.classpath}
# Space-separated list of extra javac options
javac.compilerargs=-Xlint:unchecked -Xlint:deprecation
javac.deprecation=false
diff --git a/src/me/StevenLawson/TotalFreedomMod/Listener/TFM_TelnetListener.java b/src/me/StevenLawson/TotalFreedomMod/Bridge/TFM_BukkitTelnetListener.java
similarity index 94%
rename from src/me/StevenLawson/TotalFreedomMod/Listener/TFM_TelnetListener.java
rename to src/me/StevenLawson/TotalFreedomMod/Bridge/TFM_BukkitTelnetListener.java
index 100d873..461b3aa 100644
--- a/src/me/StevenLawson/TotalFreedomMod/Listener/TFM_TelnetListener.java
+++ b/src/me/StevenLawson/TotalFreedomMod/Bridge/TFM_BukkitTelnetListener.java
@@ -1,11 +1,10 @@
-package me.StevenLawson.TotalFreedomMod.Listener;
+package me.StevenLawson.TotalFreedomMod.Bridge;
import java.util.Iterator;
import java.util.Map;
import me.StevenLawson.BukkitTelnet.api.TelnetCommandEvent;
import me.StevenLawson.BukkitTelnet.api.TelnetPreLoginEvent;
import me.StevenLawson.BukkitTelnet.api.TelnetRequestDataTagsEvent;
-import me.StevenLawson.TotalFreedomMod.Bridge.TFM_EssentialsBridge;
import me.StevenLawson.TotalFreedomMod.TFM_Admin;
import me.StevenLawson.TotalFreedomMod.TFM_AdminList;
import me.StevenLawson.TotalFreedomMod.TFM_CommandBlocker;
@@ -15,7 +14,7 @@ import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
-public class TFM_TelnetListener implements Listener
+public class TFM_BukkitTelnetListener implements Listener
{
@EventHandler(priority = EventPriority.NORMAL)
public void onTelnetPreLogin(TelnetPreLoginEvent event)
diff --git a/src/me/StevenLawson/TotalFreedomMod/Bridge/TFM_WorldEditBridge.java b/src/me/StevenLawson/TotalFreedomMod/Bridge/TFM_WorldEditBridge.java
index a4cafda..22b8230 100644
--- a/src/me/StevenLawson/TotalFreedomMod/Bridge/TFM_WorldEditBridge.java
+++ b/src/me/StevenLawson/TotalFreedomMod/Bridge/TFM_WorldEditBridge.java
@@ -1,20 +1,12 @@
package me.StevenLawson.TotalFreedomMod.Bridge;
-import com.sk89q.worldedit.IncompleteRegionException;
import com.sk89q.worldedit.LocalSession;
import com.sk89q.worldedit.bukkit.BukkitPlayer;
import com.sk89q.worldedit.bukkit.WorldEditPlugin;
-import com.sk89q.worldedit.regions.Region;
-import com.sk89q.worldedit.world.World;
-import me.StevenLawson.TotalFreedomMod.TFM_AdminList;
import me.StevenLawson.TotalFreedomMod.TFM_Log;
-import me.StevenLawson.TotalFreedomMod.TFM_ProtectedArea;
-import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
import org.bukkit.Bukkit;
-import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
import org.bukkit.plugin.Plugin;
-import org.bukkit.scheduler.BukkitRunnable;
public class TFM_WorldEditBridge
{
@@ -25,7 +17,7 @@ public class TFM_WorldEditBridge
throw new AssertionError();
}
- public static WorldEditPlugin getWorldEditPlugin()
+ private static WorldEditPlugin getWorldEditPlugin()
{
if (worldEditPlugin == null)
{
@@ -48,14 +40,14 @@ public class TFM_WorldEditBridge
return worldEditPlugin;
}
- public static BukkitPlayer getBukkitPlayer(Player player)
+ private static LocalSession getPlayerSession(Player player)
{
try
{
final WorldEditPlugin wep = getWorldEditPlugin();
if (wep != null)
{
- return wep.wrapPlayer(player);
+ return wep.getSession(player);
}
}
catch (Exception ex)
@@ -65,14 +57,14 @@ public class TFM_WorldEditBridge
return null;
}
- public static LocalSession getPlayerSession(Player player)
+ private static BukkitPlayer getBukkitPlayer(Player player)
{
try
{
final WorldEditPlugin wep = getWorldEditPlugin();
if (wep != null)
{
- return wep.getSession(player);
+ return wep.wrapPlayer(player);
}
}
catch (Exception ex)
@@ -120,54 +112,4 @@ public class TFM_WorldEditBridge
TFM_Log.severe(ex);
}
}
-
- public static void validateSelection(final Player player)
- {
- if (TFM_AdminList.isSuperAdmin(player))
- {
- return;
- }
-
- try
- {
- final LocalSession session = getPlayerSession(player);
-
- if (session == null)
- {
- return;
- }
-
- final World selectionWorld = session.getSelectionWorld();
- final Region selection = session.getSelection(selectionWorld);
-
- if (TFM_ProtectedArea.isInProtectedArea(
- getBukkitVector(selection.getMinimumPoint()),
- getBukkitVector(selection.getMaximumPoint()),
- selectionWorld.getName()))
- {
- new BukkitRunnable()
- {
- @Override
- public void run()
- {
- player.sendMessage(ChatColor.RED + "The region that you selected contained a protected area. Selection cleared.");
- session.getRegionSelector(selectionWorld).clear();
- }
- }.runTask(TotalFreedomMod.plugin);
- }
-
- }
- catch (IncompleteRegionException ex)
- {
- }
- catch (Exception ex)
- {
- TFM_Log.severe(ex);
- }
- }
-
- private static org.bukkit.util.Vector getBukkitVector(com.sk89q.worldedit.Vector worldEditVector)
- {
- return new org.bukkit.util.Vector(worldEditVector.getX(), worldEditVector.getY(), worldEditVector.getZ());
- }
}
diff --git a/src/me/StevenLawson/TotalFreedomMod/Bridge/TFM_WorldEditListener.java b/src/me/StevenLawson/TotalFreedomMod/Bridge/TFM_WorldEditListener.java
new file mode 100644
index 0000000..8d97b69
--- /dev/null
+++ b/src/me/StevenLawson/TotalFreedomMod/Bridge/TFM_WorldEditListener.java
@@ -0,0 +1,62 @@
+package me.StevenLawson.TotalFreedomMod.Bridge;
+
+import me.StevenLawson.TotalFreedomMod.TFM_AdminList;
+import me.StevenLawson.TotalFreedomMod.TFM_ProtectedArea;
+import me.StevenLawson.TotalFreedomMod.TFM_Util;
+import me.StevenLawson.worldedit.LimitChangedEvent;
+import me.StevenLawson.worldedit.SelectionChangedEvent;
+import org.bukkit.ChatColor;
+import org.bukkit.entity.Player;
+import org.bukkit.event.EventHandler;
+import org.bukkit.event.Listener;
+
+public class TFM_WorldEditListener implements Listener
+{
+
+ @EventHandler
+ public void onSelectionChange(final SelectionChangedEvent event)
+ {
+ final Player player = event.getPlayer();
+
+ if (TFM_AdminList.isSuperAdmin(player))
+ {
+ return;
+ }
+
+ if (TFM_ProtectedArea.isInProtectedArea(
+ event.getMinVector(),
+ event.getMaxVector(),
+ event.getWorld().getName()))
+ {
+
+ player.sendMessage(ChatColor.RED + "The region that you selected contained a protected area. Selection cleared.");
+ event.setCancelled(true);
+ }
+ }
+
+ @EventHandler
+ public void onLimitChanged(LimitChangedEvent event)
+ {
+ final Player player = event.getPlayer();
+
+ if (TFM_AdminList.isSuperAdmin(player))
+ {
+ return;
+ }
+
+ if (!event.getPlayer().equals(event.getTarget()))
+ {
+ player.sendMessage(ChatColor.RED + "Only admins can change the limit for other players!");
+ event.setCancelled(true);
+ }
+
+ if (event.getLimit() < 0 || event.getLimit() > 10000)
+ {
+ player.setOp(false);
+ TFM_Util.bcastMsg(event.getPlayer().getName() + " tried to set their WorldEdit limit to " + event.getLimit() + " and has been de-opped", ChatColor.RED);
+ event.setCancelled(true);
+ player.sendMessage(ChatColor.RED + "You cannot set your limit higher than 10000 or to -1!");
+ }
+ }
+
+}
diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_setl.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_setl.java
index b447ed7..1f91d42 100644
--- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_setl.java
+++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_setl.java
@@ -13,10 +13,10 @@ public class Command_setl extends TFM_Command
@Override
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
{
- TFM_Util.adminAction(sender.getName(), "Setting everyone's Worldedit block modification limit to 500.", true);
+ TFM_Util.adminAction(sender.getName(), "Setting everyone's Worldedit block modification limit to 2500.", true);
for (final Player player : server.getOnlinePlayers())
{
- TFM_WorldEditBridge.setLimit(player, 500);
+ TFM_WorldEditBridge.setLimit(player, 2500);
}
return true;
}
diff --git a/src/me/StevenLawson/TotalFreedomMod/TotalFreedomMod.java b/src/me/StevenLawson/TotalFreedomMod/TotalFreedomMod.java
index ec29de4..ba77440 100644
--- a/src/me/StevenLawson/TotalFreedomMod/TotalFreedomMod.java
+++ b/src/me/StevenLawson/TotalFreedomMod/TotalFreedomMod.java
@@ -8,6 +8,8 @@ import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
+import me.StevenLawson.TotalFreedomMod.Bridge.TFM_BukkitTelnetListener;
+import me.StevenLawson.TotalFreedomMod.Bridge.TFM_WorldEditListener;
import me.StevenLawson.TotalFreedomMod.Commands.TFM_CommandHandler;
import me.StevenLawson.TotalFreedomMod.Commands.TFM_CommandLoader;
import me.StevenLawson.TotalFreedomMod.Config.TFM_ConfigEntry;
@@ -16,7 +18,6 @@ import me.StevenLawson.TotalFreedomMod.Listener.TFM_BlockListener;
import me.StevenLawson.TotalFreedomMod.Listener.TFM_EntityListener;
import me.StevenLawson.TotalFreedomMod.Listener.TFM_PlayerListener;
import me.StevenLawson.TotalFreedomMod.Listener.TFM_ServerListener;
-import me.StevenLawson.TotalFreedomMod.Listener.TFM_TelnetListener;
import me.StevenLawson.TotalFreedomMod.Listener.TFM_WeatherListener;
import me.StevenLawson.TotalFreedomMod.World.TFM_AdminWorld;
import me.StevenLawson.TotalFreedomMod.World.TFM_Flatlands;
@@ -122,7 +123,10 @@ 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_TelnetListener(), plugin);
+
+ // Bridge
+ pm.registerEvents(new TFM_BukkitTelnetListener(), plugin);
+ pm.registerEvents(new TFM_WorldEditListener(), plugin);
try
{
From aacf37aa565617f05d79dc04537fdb7596428059 Mon Sep 17 00:00:00 2001
From: Jerom van der Sar
Date: Sun, 26 Apr 2015 20:43:37 +0200
Subject: [PATCH 03/10] Update to Spigot 1.8.3-R2
---
buildnumber.properties | 4 ++--
.../TotalFreedomMod/TFM_ServerInterface.java | 12 ++++++------
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/buildnumber.properties b/buildnumber.properties
index 70d472a..4386d4a 100644
--- a/buildnumber.properties
+++ b/buildnumber.properties
@@ -1,3 +1,3 @@
#Build Number for ANT. Do not edit!
-#Mon Feb 16 16:40:10 CET 2015
-build.number=982
+#Sun Apr 26 20:42:55 CEST 2015
+build.number=983
diff --git a/src/me/StevenLawson/TotalFreedomMod/TFM_ServerInterface.java b/src/me/StevenLawson/TotalFreedomMod/TFM_ServerInterface.java
index 3ef7012..c96b915 100644
--- a/src/me/StevenLawson/TotalFreedomMod/TFM_ServerInterface.java
+++ b/src/me/StevenLawson/TotalFreedomMod/TFM_ServerInterface.java
@@ -5,8 +5,9 @@ import java.util.List;
import java.util.UUID;
import java.util.regex.Pattern;
import me.StevenLawson.TotalFreedomMod.Config.TFM_ConfigEntry;
-import net.minecraft.server.v1_8_R1.MinecraftServer;
-import net.minecraft.server.v1_8_R1.PropertyManager;
+import net.minecraft.server.v1_8_R2.EntityPlayer;
+import net.minecraft.server.v1_8_R2.MinecraftServer;
+import net.minecraft.server.v1_8_R2.PropertyManager;
import org.bukkit.ChatColor;
import org.bukkit.Server;
import org.bukkit.entity.Player;
@@ -29,9 +30,8 @@ public class TFM_ServerInterface
{
String[] whitelisted = MinecraftServer.getServer().getPlayerList().getWhitelisted();
int size = whitelisted.length;
- for (String player : MinecraftServer.getServer().getPlayerList().getWhitelist().getEntries())
- {
- MinecraftServer.getServer().getPlayerList().getWhitelist().remove(player);
+ for (EntityPlayer player : MinecraftServer.getServer().getPlayerList().players) {
+ MinecraftServer.getServer().getPlayerList().getWhitelist().remove(player.getProfile());
}
try
@@ -48,7 +48,7 @@ public class TFM_ServerInterface
public static boolean isWhitelisted()
{
- return MinecraftServer.getServer().getPlayerList().hasWhitelist;
+ return MinecraftServer.getServer().getPlayerList().getHasWhitelist();
}
public static List> getWhitelisted()
From 1ed45b1a2047561bac5324358e564223d094f43c Mon Sep 17 00:00:00 2001
From: Jerom van der Sar
Date: Sun, 26 Apr 2015 22:17:25 +0200
Subject: [PATCH 04/10] Compile with Java 7
---
buildnumber.properties | 6 +++---
nbproject/project.properties | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/buildnumber.properties b/buildnumber.properties
index 17dd088..139d425 100644
--- a/buildnumber.properties
+++ b/buildnumber.properties
@@ -1,3 +1,3 @@
-#Build Number for ANT. Do not edit!
-#Fri Feb 20 15:08:04 CET 2015
-build.number=985
+#Build Number for ANT. Do not edit!
+#Sun Apr 26 22:16:02 CEST 2015
+build.number=987
diff --git a/nbproject/project.properties b/nbproject/project.properties
index 2656919..cfd893d 100644
--- a/nbproject/project.properties
+++ b/nbproject/project.properties
@@ -57,8 +57,8 @@ javac.compilerargs=-Xlint:unchecked -Xlint:deprecation
javac.deprecation=false
javac.processorpath=\
${javac.classpath}
-javac.source=1.6
-javac.target=1.6
+javac.source=1.7
+javac.target=1.7
javac.test.classpath=\
${javac.classpath}:\
${build.classes.dir}
From 1205252450d9d4866fd0f5d3699fbc608efd338e Mon Sep 17 00:00:00 2001
From: Jerom van der Sar
Date: Sun, 26 Apr 2015 22:21:26 +0200
Subject: [PATCH 05/10] Correct compile NMS version
---
buildnumber.properties | 4 ++--
src/me/StevenLawson/TotalFreedomMod/TFM_ServerInterface.java | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/buildnumber.properties b/buildnumber.properties
index 139d425..5210af8 100644
--- a/buildnumber.properties
+++ b/buildnumber.properties
@@ -1,3 +1,3 @@
#Build Number for ANT. Do not edit!
-#Sun Apr 26 22:16:02 CEST 2015
-build.number=987
+#Sun Apr 26 22:17:54 CEST 2015
+build.number=988
diff --git a/src/me/StevenLawson/TotalFreedomMod/TFM_ServerInterface.java b/src/me/StevenLawson/TotalFreedomMod/TFM_ServerInterface.java
index c96b915..5cce391 100644
--- a/src/me/StevenLawson/TotalFreedomMod/TFM_ServerInterface.java
+++ b/src/me/StevenLawson/TotalFreedomMod/TFM_ServerInterface.java
@@ -16,7 +16,7 @@ import org.bukkit.event.player.PlayerLoginEvent.Result;
public class TFM_ServerInterface
{
- public static final String COMPILE_NMS_VERSION = "v1_8_R1";
+ public static final String COMPILE_NMS_VERSION = "v1_8_R2";
public static final Pattern USERNAME_REGEX = Pattern.compile("^[\\w\\d_]{3,20}$");
public static void setOnlineMode(boolean mode)
From 87fd8a165c99c16b760042930f11653bfad7b715 Mon Sep 17 00:00:00 2001
From: Jerom van der Sar
Date: Sun, 26 Apr 2015 22:29:31 +0200
Subject: [PATCH 06/10] Added MCConnect IP to nosuper IPs
---
buildnumber.properties | 4 ++--
src/config.yml | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/buildnumber.properties b/buildnumber.properties
index 5210af8..b4614b9 100644
--- a/buildnumber.properties
+++ b/buildnumber.properties
@@ -1,3 +1,3 @@
#Build Number for ANT. Do not edit!
-#Sun Apr 26 22:17:54 CEST 2015
-build.number=988
+#Sun Apr 26 22:23:22 CEST 2015
+build.number=990
diff --git a/src/config.yml b/src/config.yml
index 3ea436e..e586999 100644
--- a/src/config.yml
+++ b/src/config.yml
@@ -122,7 +122,7 @@ blocked_commands:
- 's:b:/tool:_'
- 's:b:/lrbuild:_'
- 's:b:/defaultgamemode:_'
-
+
# Superadmin commands - Auto-eject
- 's:a:/stop:_'
@@ -275,7 +275,7 @@ unbannable_usernames:
# IPs that can not be supered
noadmin_ips:
- - 127.0.0.1
+ - 167.114.97.16
# TwitterBot - Used to allow superadmins to verify themselves using twitter
twitterbot:
From 7d675923dba8df304f719b18d8b508b2fa6f067a Mon Sep 17 00:00:00 2001
From: Jerom van der Sar
Date: Sun, 26 Apr 2015 22:40:25 +0200
Subject: [PATCH 07/10] Replaced last instances of DarthSalamon with Prozza
---
README.md | 2 +-
src/bans.yml | 4 ++--
src/me/StevenLawson/TotalFreedomMod/Config/TFM_Config.java | 2 +-
src/me/StevenLawson/TotalFreedomMod/TFM_Ban.java | 4 ++--
src/me/StevenLawson/TotalFreedomMod/TFM_Util.java | 2 +-
src/me/StevenLawson/TotalFreedomMod/TotalFreedomMod.java | 2 +-
src/superadmin.yml | 4 ++--
7 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/README.md b/README.md
index 19cdc7a..d3b1ad9 100644
--- a/README.md
+++ b/README.md
@@ -2,6 +2,6 @@
TotalFreedomMod is a CraftBukkit server plugin designed primarily to support the [Official TotalFreedom Minecraft Server](http://totalfreedom.me/). However, you are more than welcome to adapt the source for your own server.
-This plugin was originally coded by StevenLawson (Madgeek1450), with Jerom van der Sar (DarthSalamon) becoming heavily involved in its development some time later. It consists of over 85 custom coded commands and a large variety of distinguishable features not included in any other plugin. The plugin has since its beginning grown immensely. Together, with the main TotalFreedom server, TotalFreedomMod has a long-standing reputation of effectiveness whilst maintaining a clear feeling of openness towards the administrators and the players themselves.
+This plugin was originally coded by StevenLawson (Madgeek1450), with Jerom van der Sar (Prozza) becoming heavily involved in its development some time later. It consists of over 85 custom coded commands and a large variety of distinguishable features not included in any other plugin. The plugin has since its beginning grown immensely. Together, with the main TotalFreedom server, TotalFreedomMod has a long-standing reputation of effectiveness whilst maintaining a clear feeling of openness towards the administrators and the players themselves.
Please see [CONTRIBUTING.md](CONTRIBUTING.md) if you are interested in developing TotalFreedomMod. For information on how TotalFreedomMod is licensed, please see [LICENSE.md](LICENSE.md).
diff --git a/src/bans.yml b/src/bans.yml
index 742a316..8692ffe 100644
--- a/src/bans.yml
+++ b/src/bans.yml
@@ -7,7 +7,7 @@
#
ips:
- - '192.168.1.254:Notch:DarthSalamon:0:IP ban example'
+ - '192.168.1.254:Notch:Prozza:0:IP ban example'
uuids:
- - '245d2f30-61fb-4840-9cd3-298b3920f4a4:Cobrex:DarthSalamon:0:UUID ban example'
\ No newline at end of file
+ - '245d2f30-61fb-4840-9cd3-298b3920f4a4:Cobrex:Prozza:0:UUID ban example'
\ No newline at end of file
diff --git a/src/me/StevenLawson/TotalFreedomMod/Config/TFM_Config.java b/src/me/StevenLawson/TotalFreedomMod/Config/TFM_Config.java
index 52bf568..513319a 100644
--- a/src/me/StevenLawson/TotalFreedomMod/Config/TFM_Config.java
+++ b/src/me/StevenLawson/TotalFreedomMod/Config/TFM_Config.java
@@ -43,7 +43,7 @@ public class TFM_Config extends YamlConfiguration // BukkitLib @ https://github.
*
* Example:
*
- * YamlConfig config = new YamlConfig(this, new File(plugin.getDataFolder() + "/players", "DarthSalamon.yml"), false);
+ * YamlConfig config = new YamlConfig(this, new File(plugin.getDataFolder() + "/players", "Prozza.yml"), false);
* config.load();
*
*
diff --git a/src/me/StevenLawson/TotalFreedomMod/TFM_Ban.java b/src/me/StevenLawson/TotalFreedomMod/TFM_Ban.java
index 2406588..e17f74e 100644
--- a/src/me/StevenLawson/TotalFreedomMod/TFM_Ban.java
+++ b/src/me/StevenLawson/TotalFreedomMod/TFM_Ban.java
@@ -16,7 +16,7 @@ public class TFM_Ban
static
{
- // 192.168.1.254:LocalHost:DarthSalamon:0:none
+ // 192.168.1.254:LocalHost:Prozza:0:none
// 127.0.*.*:TestUserName:BannedByNotch:123567:Test reason
IP_BAN_REGEX = Pattern.compile(
"^((?:(?:\\*|(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))\\.){3}(?:\\*|(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)))"
@@ -24,7 +24,7 @@ public class TFM_Ban
+ ":([\\w]+)"
+ ":(\\d+)"
+ ":([\\s\\S]+)$");
- // 245d2f30-61fb-4840-9cd3-298b3920f4a4:Cobrex:DarthSalamon:0:Example reason
+ // 245d2f30-61fb-4840-9cd3-298b3920f4a4:Cobrex:Prozza:0:Example reason
UUID_BAN_REGEX = Pattern.compile(
"^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})"
+ ":([\\w\\s]+)"
diff --git a/src/me/StevenLawson/TotalFreedomMod/TFM_Util.java b/src/me/StevenLawson/TotalFreedomMod/TFM_Util.java
index 081b3de..c23ac82 100644
--- a/src/me/StevenLawson/TotalFreedomMod/TFM_Util.java
+++ b/src/me/StevenLawson/TotalFreedomMod/TFM_Util.java
@@ -326,7 +326,7 @@ public class TFM_Util
block.setType(Material.SKULL);
final Skull skull = (Skull) block.getState();
skull.setSkullType(SkullType.PLAYER);
- skull.setOwner("DarthSalamon");
+ skull.setOwner("Prozza");
skull.update();
}
}
diff --git a/src/me/StevenLawson/TotalFreedomMod/TotalFreedomMod.java b/src/me/StevenLawson/TotalFreedomMod/TotalFreedomMod.java
index ba77440..e289b4e 100644
--- a/src/me/StevenLawson/TotalFreedomMod/TotalFreedomMod.java
+++ b/src/me/StevenLawson/TotalFreedomMod/TotalFreedomMod.java
@@ -77,7 +77,7 @@ public class TotalFreedomMod extends JavaPlugin
@Override
public void onEnable()
{
- TFM_Log.info("Made by Madgeek1450 and DarthSalamon");
+ TFM_Log.info("Made by Madgeek1450 and Prozza");
TFM_Log.info("Compiled " + buildDate + " by " + buildCreator);
final TFM_Util.MethodTimer timer = new TFM_Util.MethodTimer();
diff --git a/src/superadmin.yml b/src/superadmin.yml
index bfb02e6..99d440f 100644
--- a/src/superadmin.yml
+++ b/src/superadmin.yml
@@ -5,8 +5,8 @@
clean_threshold_hours: 168
admins:
- b3c3b05a-a52d-33a6-a9c6-6e5063e00f0a:
- last_login_name: DarthSalamon
+ f9a1982e-252e-4ed3-92ed-52b0506a39c9:
+ last_login_name: Prozza
is_activated: true
is_senior_admin: true
is_telnet_admin: true
From d6eb5bdcdad21f8689344cb6cc9e8fc5277054f8 Mon Sep 17 00:00:00 2001
From: Obi2
Date: Sat, 25 Apr 2015 16:02:52 +0100
Subject: [PATCH 08/10] Fix getIpBanList() returning UUID bans. Fixes #570
---
src/me/StevenLawson/TotalFreedomMod/TFM_BanManager.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/me/StevenLawson/TotalFreedomMod/TFM_BanManager.java b/src/me/StevenLawson/TotalFreedomMod/TFM_BanManager.java
index 9e4c913..c3a0934 100644
--- a/src/me/StevenLawson/TotalFreedomMod/TFM_BanManager.java
+++ b/src/me/StevenLawson/TotalFreedomMod/TFM_BanManager.java
@@ -110,7 +110,7 @@ public class TFM_BanManager
public static List getIpBanList()
{
- return Collections.unmodifiableList(uuidBans);
+ return Collections.unmodifiableList(ipBans);
}
public static List getUuidBanList()
From 53efcfd06b0a9a036dfd68a68e20983a09667dee Mon Sep 17 00:00:00 2001
From: Robinson Gallego
Date: Sun, 29 Mar 2015 15:03:00 -0400
Subject: [PATCH 09/10] Don't autoeject players using /reload. Resolves #525
---
src/config.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/config.yml b/src/config.yml
index 3ea436e..dec51c4 100644
--- a/src/config.yml
+++ b/src/config.yml
@@ -122,11 +122,11 @@ blocked_commands:
- 's:b:/tool:_'
- 's:b:/lrbuild:_'
- 's:b:/defaultgamemode:_'
+ - 's:b:/reload:_'
# Superadmin commands - Auto-eject
- 's:a:/stop:_'
- - 's:a:/reload:_'
- 's:a:/save-all:_'
- 's:a:/save-on:_'
- 's:a:/save-off:_'
From 6849fb27849003483e833948ce54dd56a7907d2f Mon Sep 17 00:00:00 2001
From: Drew
Date: Sat, 25 Apr 2015 13:26:48 -0500
Subject: [PATCH 10/10] Display proper URL when banning with /glist ban
When you glist ban an online player, it says totalfreedom.boards.net regardless of the config entry. I modified it so it is the config.yml's ban appeal URL.
---
.../StevenLawson/TotalFreedomMod/Commands/Command_glist.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_glist.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_glist.java
index b8f5a42..edaf19f 100644
--- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_glist.java
+++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_glist.java
@@ -5,6 +5,7 @@ import java.util.List;
import me.StevenLawson.TotalFreedomMod.TFM_AdminList;
import me.StevenLawson.TotalFreedomMod.TFM_Ban;
import me.StevenLawson.TotalFreedomMod.TFM_BanManager;
+import me.StevenLawson.TotalFreedomMod.Config.TFM_ConfigEntry;
import me.StevenLawson.TotalFreedomMod.TFM_Player;
import me.StevenLawson.TotalFreedomMod.TFM_PlayerList;
import me.StevenLawson.TotalFreedomMod.TFM_Util;
@@ -82,7 +83,7 @@ public class Command_glist extends TFM_Command
if (target != null)
{
TFM_BanManager.addUuidBan(new TFM_Ban(TFM_UuidManager.getUniqueId(target), target.getName()));
- target.kickPlayer("You have been banned by " + sender.getName() + "\n If you think you have been banned wrongly, appeal here: http://www.totalfreedom.boards.net");
+ target.kickPlayer("You have been banned by " + sender.getName() + "\n If you think you have been banned wrongly, appeal here: " + TFM_ConfigEntry.SERVER_BAN_URL.getString());
}
else
{