Archiviert
13
0

Ignore depcreciation - we're using the method correctly.

Dieser Commit ist enthalten in:
Kristian S. Stangeland 2012-12-06 04:04:07 +01:00
Ursprung 6530db23b7
Commit af546e7f1d
5 geänderte Dateien mit 12 neuen und 5 gelöschten Zeilen

Datei anzeigen

@ -4,7 +4,7 @@
<groupId>com.comphenix.protocol</groupId> <groupId>com.comphenix.protocol</groupId>
<artifactId>ProtocolLib</artifactId> <artifactId>ProtocolLib</artifactId>
<name>ProtocolLib</name> <name>ProtocolLib</name>
<version>1.7.2-SNAPSHOT</version> <version>1.8.0-SNAPSHOT</version>
<description>Provides read/write access to the Minecraft protocol.</description> <description>Provides read/write access to the Minecraft protocol.</description>
<url>http://dev.bukkit.org/server-mods/protocollib/</url> <url>http://dev.bukkit.org/server-mods/protocollib/</url>
<developers> <developers>

Datei anzeigen

@ -47,6 +47,7 @@ class CommandProtocol extends CommandBase {
return true; return true;
} }
@SuppressWarnings("deprecation")
public void checkVersion(final CommandSender sender) { public void checkVersion(final CommandSender sender) {
// Perform on an async thread // Perform on an async thread
plugin.getServer().getScheduler().scheduleAsyncDelayedTask(plugin, new Runnable() { plugin.getServer().getScheduler().scheduleAsyncDelayedTask(plugin, new Runnable() {
@ -64,6 +65,7 @@ class CommandProtocol extends CommandBase {
updateFinished(); updateFinished();
} }
@SuppressWarnings("deprecation")
public void updateVersion(final CommandSender sender) { public void updateVersion(final CommandSender sender) {
// Perform on an async thread // Perform on an async thread
plugin.getServer().getScheduler().scheduleAsyncDelayedTask(plugin, new Runnable() { plugin.getServer().getScheduler().scheduleAsyncDelayedTask(plugin, new Runnable() {

Datei anzeigen

@ -242,7 +242,7 @@ public class AsyncListenerHandler {
final AsyncRunnable listenerLoop = getListenerLoop(); final AsyncRunnable listenerLoop = getListenerLoop();
filterManager.getScheduler().scheduleAsyncDelayedTask(listener.getPlugin(), new Runnable() { scheduleAsync(new Runnable() {
@Override @Override
public void run() { public void run() {
Thread thread = Thread.currentThread(); Thread thread = Thread.currentThread();
@ -290,7 +290,7 @@ public class AsyncListenerHandler {
final AsyncRunnable listenerLoop = getListenerLoop(); final AsyncRunnable listenerLoop = getListenerLoop();
final Function<AsyncRunnable, Void> delegateCopy = executor; final Function<AsyncRunnable, Void> delegateCopy = executor;
filterManager.getScheduler().scheduleAsyncDelayedTask(listener.getPlugin(), new Runnable() { scheduleAsync(new Runnable() {
@Override @Override
public void run() { public void run() {
delegateCopy.apply(listenerLoop); delegateCopy.apply(listenerLoop);
@ -298,6 +298,11 @@ public class AsyncListenerHandler {
}); });
} }
@SuppressWarnings("deprecation")
private void scheduleAsync(Runnable runnable) {
filterManager.getScheduler().scheduleAsyncDelayedTask(listener.getPlugin(), runnable);
}
/** /**
* Create a friendly thread name using the following convention: * Create a friendly thread name using the following convention:
* <p><code> * <p><code>

Datei anzeigen

@ -28,7 +28,6 @@ import java.net.SocketAddress;
import net.sf.cglib.proxy.Factory; import net.sf.cglib.proxy.Factory;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.scheduler.BukkitWorker;
import com.comphenix.protocol.Packets; import com.comphenix.protocol.Packets;
import com.comphenix.protocol.error.ErrorReporter; import com.comphenix.protocol.error.ErrorReporter;

Datei anzeigen

@ -234,6 +234,7 @@ class Metrics {
* *
* @return True if statistics measuring is running, otherwise false. * @return True if statistics measuring is running, otherwise false.
*/ */
@SuppressWarnings("deprecation")
public boolean start() { public boolean start() {
synchronized (optOutLock) { synchronized (optOutLock) {
// Did we opt out? // Did we opt out?