summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIaccidentally <coryhuckaby@gmail.com>2013-01-31 14:03:27 -0500
committerIaccidentally <coryhuckaby@gmail.com>2013-01-31 14:03:27 -0500
commitcd126264e0a246c914284b460c1e0075d199cba8 (patch)
treeb925b59366e26b41b1a28fb3ad799279017663a0
parent3d4d616414cd0182742c38b54de758a7d4ba6d6e (diff)
downloadEssentials-cd126264e0a246c914284b460c1e0075d199cba8.tar
Essentials-cd126264e0a246c914284b460c1e0075d199cba8.tar.gz
Essentials-cd126264e0a246c914284b460c1e0075d199cba8.tar.lz
Essentials-cd126264e0a246c914284b460c1e0075d199cba8.tar.xz
Essentials-cd126264e0a246c914284b460c1e0075d199cba8.zip
Update to 1.4.7 R1 :: remove calls to ScheduleAsyncDelayedTask, as it is deprecated :: cleanup :: WARNING: This commit may or may not be stable
-rw-r--r--Essentials/src/com/earth2me/essentials/Essentials.java10
-rw-r--r--Essentials/src/com/earth2me/essentials/IEssentials.java5
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandheal.java1
-rw-r--r--Essentials/src/com/earth2me/essentials/metrics/MetricsListener.java2
-rw-r--r--EssentialsProtect/src/com/earth2me/essentials/protect/data/ProtectedBlockMemory.java18
-rw-r--r--lib/bukkit.jarbin4830386 -> 4832358 bytes
-rw-r--r--lib/craftbukkit.jarbin12541185 -> 12533832 bytes
7 files changed, 27 insertions, 9 deletions
diff --git a/Essentials/src/com/earth2me/essentials/Essentials.java b/Essentials/src/com/earth2me/essentials/Essentials.java
index 4be868d4c..950d250b3 100644
--- a/Essentials/src/com/earth2me/essentials/Essentials.java
+++ b/Essentials/src/com/earth2me/essentials/Essentials.java
@@ -63,6 +63,7 @@ import org.bukkit.plugin.PluginDescriptionFile;
import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.scheduler.BukkitScheduler;
+import org.bukkit.scheduler.BukkitTask;
import org.yaml.snakeyaml.error.YAMLException;
@@ -608,9 +609,14 @@ public class Essentials extends JavaPlugin implements IEssentials
}
@Override
- public int scheduleAsyncDelayedTask(final Runnable run)
+ public BukkitTask scheduleAsyncDelayedTask(final Runnable run)
{
- return this.getScheduler().scheduleAsyncDelayedTask(this, run);
+ return this.getScheduler().runTaskAsynchronously(this, run);
+ }
+ @Override
+ public BukkitTask runTaskLaterAsynchronously(final Runnable run, final long delay)
+ {
+ return this.getScheduler().runTaskLaterAsynchronously(this, run, delay);
}
@Override
diff --git a/Essentials/src/com/earth2me/essentials/IEssentials.java b/Essentials/src/com/earth2me/essentials/IEssentials.java
index 9d61391d1..6a2e3b638 100644
--- a/Essentials/src/com/earth2me/essentials/IEssentials.java
+++ b/Essentials/src/com/earth2me/essentials/IEssentials.java
@@ -10,6 +10,7 @@ import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.plugin.Plugin;
import org.bukkit.scheduler.BukkitScheduler;
+import org.bukkit.scheduler.BukkitTask;
public interface IEssentials extends Plugin
@@ -44,7 +45,9 @@ public interface IEssentials extends Plugin
Methods getPaymentMethod();
- int scheduleAsyncDelayedTask(Runnable run);
+ BukkitTask scheduleAsyncDelayedTask(Runnable run);
+
+ BukkitTask runTaskLaterAsynchronously(Runnable run, long delay);
int scheduleSyncDelayedTask(Runnable run);
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandheal.java b/Essentials/src/com/earth2me/essentials/commands/Commandheal.java
index 23a8078b1..285d37233 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandheal.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandheal.java
@@ -7,7 +7,6 @@ import org.bukkit.Server;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.potion.PotionEffect;
-import org.bukkit.potion.PotionEffectType;
public class Commandheal extends EssentialsCommand
diff --git a/Essentials/src/com/earth2me/essentials/metrics/MetricsListener.java b/Essentials/src/com/earth2me/essentials/metrics/MetricsListener.java
index 7016ffe4f..e9b9a2947 100644
--- a/Essentials/src/com/earth2me/essentials/metrics/MetricsListener.java
+++ b/Essentials/src/com/earth2me/essentials/metrics/MetricsListener.java
@@ -33,7 +33,7 @@ public class MetricsListener implements Listener
player.sendMessage("To opt out, run /essentials opt-out");
ess.getLogger().log(Level.INFO, "[Metrics] Admin join - Starting 5 minute opt-out period.");
ess.getSettings().setMetricsEnabled(true);
- ess.getScheduler().scheduleAsyncDelayedTask(ess, starter, 5 * 1200);
+ ess.getScheduler().runTaskLaterAsynchronously(ess, starter, 5 * 1200);
}
}
}
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/data/ProtectedBlockMemory.java b/EssentialsProtect/src/com/earth2me/essentials/protect/data/ProtectedBlockMemory.java
index 876c8a575..e1a61f0cf 100644
--- a/EssentialsProtect/src/com/earth2me/essentials/protect/data/ProtectedBlockMemory.java
+++ b/EssentialsProtect/src/com/earth2me/essentials/protect/data/ProtectedBlockMemory.java
@@ -1,7 +1,7 @@
package com.earth2me.essentials.protect.data;
-import java.util.Map.Entry;
import java.util.*;
+import java.util.Map.Entry;
import org.bukkit.World;
import org.bukkit.block.Block;
import org.bukkit.plugin.Plugin;
@@ -123,11 +123,13 @@ public class ProtectedBlockMemory implements IProtectedBlock
importProtections(storage.exportProtections());
}
+ @Override
public void clearProtections()
{
blocks.clear();
}
+ @Override
public final void importProtections(final List<OwnedBlock> blocks)
{
for (OwnedBlock ownedBlock : blocks)
@@ -141,6 +143,7 @@ public class ProtectedBlockMemory implements IProtectedBlock
}
}
+ @Override
public List<OwnedBlock> exportProtections()
{
final List<OwnedBlock> blockList = new ArrayList<OwnedBlock>(blocks.size());
@@ -160,12 +163,14 @@ public class ProtectedBlockMemory implements IProtectedBlock
return blockList;
}
+ @Override
public void protectBlock(final Block block, final String playerName)
{
final ProtectedLocation pl = new ProtectedLocation(block, getWorldId(block.getWorld()));
protectBlock(pl, playerName);
- plugin.getServer().getScheduler().scheduleAsyncDelayedTask(plugin, new Runnable()
+ plugin.getServer().getScheduler().runTaskAsynchronously(plugin, new Runnable()
{
+ @Override
public void run()
{
storage.protectBlock(block, playerName);
@@ -173,7 +178,7 @@ public class ProtectedBlockMemory implements IProtectedBlock
});
}
- private final void protectBlock(ProtectedLocation pl, String playerName)
+ private void protectBlock(ProtectedLocation pl, String playerName)
{
int playerId = getPlayerId(playerName);
ProtectedBy pb = blocks.get(pl);
@@ -185,6 +190,7 @@ public class ProtectedBlockMemory implements IProtectedBlock
pb.add(playerId);
}
+ @Override
public boolean isProtected(Block block, String playerName)
{
int playerId = getPlayerId(playerName);
@@ -193,6 +199,7 @@ public class ProtectedBlockMemory implements IProtectedBlock
return !pb.contains(playerId);
}
+ @Override
public List<String> getOwners(Block block)
{
ProtectedLocation pl = new ProtectedLocation(block, getWorldId(block.getWorld()));
@@ -200,12 +207,14 @@ public class ProtectedBlockMemory implements IProtectedBlock
return pb.getPlayers(playerNames);
}
+ @Override
public int unprotectBlock(final Block block)
{
ProtectedLocation pl = new ProtectedLocation(block, getWorldId(block.getWorld()));
ProtectedBy pb = blocks.remove(pl);
- plugin.getServer().getScheduler().scheduleAsyncDelayedTask(plugin, new Runnable()
+ plugin.getServer().getScheduler().runTaskAsynchronously(plugin, new Runnable()
{
+ @Override
public void run()
{
storage.unprotectBlock(block);
@@ -241,6 +250,7 @@ public class ProtectedBlockMemory implements IProtectedBlock
return id;
}
+ @Override
public void onPluginDeactivation()
{
storage.onPluginDeactivation();
diff --git a/lib/bukkit.jar b/lib/bukkit.jar
index 002b84f21..1f9725a9a 100644
--- a/lib/bukkit.jar
+++ b/lib/bukkit.jar
Binary files differ
diff --git a/lib/craftbukkit.jar b/lib/craftbukkit.jar
index b8dd7eab2..1cb9ca69c 100644
--- a/lib/craftbukkit.jar
+++ b/lib/craftbukkit.jar
Binary files differ