Merge pull request #1 from StevenLawson/master

Am I doing this right...?
This commit is contained in:
Steven Lawson 2013-03-20 17:23:04 -07:00
commit ff76f4c47a
8 changed files with 23 additions and 15 deletions

View file

@ -1,5 +1,5 @@
#Tue, 19 Mar 2013 18:03:45 -0400 #Wed, 20 Mar 2013 20:15:15 -0400
program.VERSION=2.11 program.VERSION=2.11
program.BUILDNUM=96 program.BUILDNUM=103
program.BUILDDATE=03/19/2013 06\:03 PM program.BUILDDATE=03/20/2013 08\:15 PM

View file

@ -1,3 +1,3 @@
#Build Number for ANT. Do not edit! #Build Number for ANT. Do not edit!
#Tue Mar 19 18:03:45 EDT 2013 #Wed Mar 20 20:15:15 EDT 2013
build.number=97 build.number=104

View file

@ -68,7 +68,7 @@ public class Command_doom extends TFM_Command
// generate explosion // generate explosion
p.getWorld().createExplosion(p.getLocation(), 4F); p.getWorld().createExplosion(p.getLocation(), 4F);
server.getScheduler().runTaskLaterAsynchronously(plugin, new Runnable() server.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable()
{ {
@Override @Override
public void run() public void run()
@ -81,7 +81,7 @@ public class Command_doom extends TFM_Command
} }
}, 40L); // 2 seconds }, 40L); // 2 seconds
server.getScheduler().runTaskLaterAsynchronously(plugin, new Runnable() server.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable()
{ {
@Override @Override
public void run() public void run()

View file

@ -176,7 +176,7 @@ public class TFM_PlayerListener implements Listener
last_block = test_block; last_block = test_block;
} }
Bukkit.getScheduler().runTaskLaterAsynchronously(TotalFreedomMod.plugin, new Runnable() Bukkit.getScheduler().scheduleSyncDelayedTask(TotalFreedomMod.plugin, new Runnable()
{ {
@Override @Override
public void run() public void run()
@ -695,7 +695,7 @@ public class TFM_PlayerListener implements Listener
if (TotalFreedomMod.adminOnlyMode) if (TotalFreedomMod.adminOnlyMode)
{ {
TotalFreedomMod.plugin.getServer().getScheduler().runTaskLaterAsynchronously(TotalFreedomMod.plugin, new Runnable() TotalFreedomMod.plugin.getServer().getScheduler().scheduleSyncDelayedTask(TotalFreedomMod.plugin, new Runnable()
{ {
@Override @Override
public void run() public void run()

View file

@ -8,7 +8,6 @@ import org.bukkit.entity.Player;
public class TFM_LandmineData public class TFM_LandmineData
{ {
public static List<TFM_LandmineData> landmines = new ArrayList<TFM_LandmineData>(); public static List<TFM_LandmineData> landmines = new ArrayList<TFM_LandmineData>();
public Location landmine_pos; public Location landmine_pos;
public Player player; public Player player;
public double radius; public double radius;

View file

@ -13,9 +13,7 @@ import org.bukkit.entity.Player;
public class TFM_UserList public class TFM_UserList
{ {
private static final String USERLIST_FILENAME = "userlist.yml"; private static final String USERLIST_FILENAME = "userlist.yml";
private static TFM_UserList instance = null; private static TFM_UserList instance = null;
private Map<String, TFM_UserListEntry> _userlist = new HashMap<String, TFM_UserListEntry>(); private Map<String, TFM_UserListEntry> _userlist = new HashMap<String, TFM_UserListEntry>();
private final TotalFreedomMod _plugin; private final TotalFreedomMod _plugin;

View file

@ -18,7 +18,6 @@ import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.exception.ExceptionUtils; import org.apache.commons.lang.exception.ExceptionUtils;
import org.bukkit.*; import org.bukkit.*;
import org.bukkit.block.Block; import org.bukkit.block.Block;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender; import org.bukkit.command.CommandSender;
import org.bukkit.entity.*; import org.bukkit.entity.*;
@ -973,4 +972,16 @@ public class TFM_Util
} }
} }
} }
public static String inputStreamToString(InputStream is, boolean preserveNewlines) throws IOException
{
BufferedReader br = new BufferedReader(new InputStreamReader(is));
StringBuilder sb = new StringBuilder();
String line;
while ((line = br.readLine()) != null)
{
sb.append(line).append(preserveNewlines ? System.lineSeparator() : "");
}
return sb.toString();
}
} }

View file

@ -101,7 +101,7 @@ public class TotalFreedomMod extends JavaPlugin
TFM_Util.deleteFolder(new File("./_deleteme")); TFM_Util.deleteFolder(new File("./_deleteme"));
server.getScheduler().runTaskTimerAsynchronously(this, new TFM_Heartbeat(this), HEARTBEAT_RATE * 20L, HEARTBEAT_RATE * 20L); server.getScheduler().scheduleSyncRepeatingTask(this, new TFM_Heartbeat(this), HEARTBEAT_RATE * 20L, HEARTBEAT_RATE * 20L);
// metrics @ http://mcstats.org/plugin/TotalFreedomMod // metrics @ http://mcstats.org/plugin/TotalFreedomMod
try try