Small bug fixes.
Dieser Commit ist enthalten in:
Ursprung
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.
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren