mirror of
https://github.com/dmulloy2/ProtocolLib.git
synced 2024-11-28 05:35:28 +01:00
Ignore depcreciation - we're using the method correctly.
This commit is contained in:
parent
6530db23b7
commit
af546e7f1d
@ -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>
|
||||||
|
@ -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() {
|
||||||
|
@ -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>
|
||||||
|
@ -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;
|
||||||
|
@ -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?
|
||||||
|
Loading…
Reference in New Issue
Block a user