mirror of
https://github.com/dmulloy2/ProtocolLib.git
synced 2024-11-27 21:26:17 +01:00
Small bug fixes.
This commit is contained in:
parent
711990fa15
commit
c77103246e
@ -92,7 +92,7 @@ public class ProtocolLibrary extends JavaPlugin {
|
||||
|
||||
private void createAsyncTask(Server server) {
|
||||
try {
|
||||
if (asyncPacketTask < 0)
|
||||
if (asyncPacketTask >= 0)
|
||||
throw new IllegalStateException("Async task has already been created");
|
||||
|
||||
// Attempt to create task
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.comphenix.protocol.async;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
@ -177,7 +178,8 @@ public class AsyncFilterManager implements AsynchronousManager {
|
||||
|
||||
@Override
|
||||
public boolean hasAsynchronousListeners(PacketEvent packet) {
|
||||
return getProcessingQueue(packet).getListener(packet.getPacketID()).size() > 0;
|
||||
Collection<?> list = getProcessingQueue(packet).getListener(packet.getPacketID());
|
||||
return list != null && list.size() > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -8,7 +8,6 @@ import org.bukkit.plugin.Plugin;
|
||||
import com.comphenix.protocol.events.PacketAdapter;
|
||||
import com.comphenix.protocol.events.PacketEvent;
|
||||
import com.comphenix.protocol.events.PacketListener;
|
||||
import com.sun.org.apache.bcel.internal.generic.GETSTATIC;
|
||||
|
||||
/**
|
||||
* Represents a handler for an asynchronous event.
|
||||
|
Loading…
Reference in New Issue
Block a user