mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-19 13:55:00 +00:00
Update to Minecraft 1.5.2
Added dev prefixes, Fixed Twitterbot bug
This commit is contained in:
parent
e433d9605f
commit
039de8ba88
@ -1,5 +1,5 @@
|
|||||||
#Tue, 09 Apr 2013 22:30:34 -0400
|
#Mon, 06 May 2013 21:59:49 +0200
|
||||||
|
|
||||||
program.VERSION=2.13
|
program.VERSION=2.13
|
||||||
program.BUILDNUM=157
|
program.BUILDNUM=160
|
||||||
program.BUILDDATE=04/09/2013 10\:30 PM
|
program.BUILDDATE=05/06/2013 09\:59 PM
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
#Build Number for ANT. Do not edit!
|
#Build Number for ANT. Do not edit!
|
||||||
#Tue Apr 09 22:30:34 EDT 2013
|
#Mon May 06 21:59:49 CEST 2013
|
||||||
build.number=158
|
build.number=161
|
||||||
|
@ -150,6 +150,11 @@ public class Command_saconfig extends TFM_Command
|
|||||||
TFM_Util.adminAction(sender.getName(), "Removing " + target_name + " from the superadmin list", true);
|
TFM_Util.adminAction(sender.getName(), "Removing " + target_name + " from the superadmin list", true);
|
||||||
TFM_SuperadminList.removeSuperadmin(target_name);
|
TFM_SuperadminList.removeSuperadmin(target_name);
|
||||||
|
|
||||||
|
if (!TotalFreedomMod.twitterbotEnabled)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
// Twitterbot
|
// Twitterbot
|
||||||
TFM_TwitterHandler twitterbot = TFM_TwitterHandler.getInstance(plugin);
|
TFM_TwitterHandler twitterbot = TFM_TwitterHandler.getInstance(plugin);
|
||||||
String reply = twitterbot.delTwitter(target_name);
|
String reply = twitterbot.delTwitter(target_name);
|
||||||
|
@ -5,11 +5,11 @@ import java.util.Date;
|
|||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
import net.minecraft.server.v1_5_R2.BanEntry;
|
import net.minecraft.server.v1_5_R3.BanEntry;
|
||||||
import net.minecraft.server.v1_5_R2.BanList;
|
import net.minecraft.server.v1_5_R3.BanList;
|
||||||
import net.minecraft.server.v1_5_R2.MinecraftServer;
|
import net.minecraft.server.v1_5_R3.MinecraftServer;
|
||||||
import net.minecraft.server.v1_5_R2.PlayerList;
|
import net.minecraft.server.v1_5_R3.PlayerList;
|
||||||
import net.minecraft.server.v1_5_R2.PropertyManager;
|
import net.minecraft.server.v1_5_R3.PropertyManager;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
@ -961,8 +961,7 @@ public class TFM_Util
|
|||||||
|
|
||||||
public static void adminChatMessage(CommandSender sender, String message, boolean senderIsConsole)
|
public static void adminChatMessage(CommandSender sender, String message, boolean senderIsConsole)
|
||||||
{
|
{
|
||||||
String name = sender.getName() + (senderIsConsole ? ChatColor.DARK_PURPLE + " (Console)" : (TFM_SuperadminList.isSeniorAdmin(sender) ? ChatColor.LIGHT_PURPLE + " (SrA)" : ChatColor.GOLD + " (SA)"));
|
String name = sender.getName() + " " + getPrefix(sender, senderIsConsole);
|
||||||
|
|
||||||
TFM_Log.info("[ADMIN] " + name + ": " + message);
|
TFM_Log.info("[ADMIN] " + name + ": " + message);
|
||||||
|
|
||||||
for (Player p : Bukkit.getOnlinePlayers())
|
for (Player p : Bukkit.getOnlinePlayers())
|
||||||
@ -974,6 +973,27 @@ public class TFM_Util
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String getPrefix(CommandSender sender, boolean senderIsConsole)
|
||||||
|
{
|
||||||
|
String prefix;
|
||||||
|
if (senderIsConsole) {
|
||||||
|
prefix = ChatColor.BLUE + "(Console)";
|
||||||
|
} else {
|
||||||
|
if (TFM_SuperadminList.isSeniorAdmin(sender))
|
||||||
|
{
|
||||||
|
prefix = ChatColor.LIGHT_PURPLE + "(SrA)";
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
prefix = ChatColor.GOLD + "(SA)";
|
||||||
|
}
|
||||||
|
if (sender.getName().equals("Madgeek1450") || sender.getName().equals("DarthSalamon"))
|
||||||
|
{
|
||||||
|
prefix = ChatColor.DARK_PURPLE + "(Dev)";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return prefix + ChatColor.WHITE;
|
||||||
|
}
|
||||||
|
|
||||||
public static String inputStreamToString(InputStream is, boolean preserveNewlines) throws IOException
|
public static String inputStreamToString(InputStream is, boolean preserveNewlines) throws IOException
|
||||||
{
|
{
|
||||||
BufferedReader br = new BufferedReader(new InputStreamReader(is));
|
BufferedReader br = new BufferedReader(new InputStreamReader(is));
|
||||||
@ -981,7 +1001,7 @@ public class TFM_Util
|
|||||||
String line;
|
String line;
|
||||||
while ((line = br.readLine()) != null)
|
while ((line = br.readLine()) != null)
|
||||||
{
|
{
|
||||||
sb.append(line).append(preserveNewlines ? System.lineSeparator() : "");
|
sb.append(line).append(preserveNewlines ? System.getProperty("line.separator") : "");
|
||||||
}
|
}
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user