This commit is contained in:
Sotr
2019-04-16 22:21:56 +08:00
parent 38e61c4f83
commit 336142f88f
4 changed files with 4 additions and 3 deletions

View File

@@ -31,7 +31,7 @@
<dependencies>
<dependency>
<groupId>com.destroystokyo.paper</groupId>
<artifactId>paper-api</artifactId>
<artifactId>akarin-api</artifactId>
<version>${api.version}</version> <!-- Akarin - allows different implemention version -->
<scope>compile</scope>
</dependency>

View File

@@ -73,6 +73,7 @@ public class AkarinCreatureSpanwner {
if (PlayerNaturallySpawnCreaturesEvent.getHandlerList().getRegisteredListeners().length != 0) {
PlayerNaturallySpawnCreaturesEvent event = new PlayerNaturallySpawnCreaturesEvent((Player) player.getBukkitEntity(), mobSpawnRange);
// prevent concurrent handling, at least
synchronized (PlayerNaturallySpawnCreaturesEvent.class) {
Bukkit.getPluginManager().callEvent(event);
}

View File

@@ -56,7 +56,7 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
});
private final EnumProtocolDirection h;
private final ConcurrentLinkedQueue<NetworkManager.QueuedPacket> packetQueue = new ConcurrentLinkedQueue<NetworkManager.QueuedPacket>(); private final Queue<NetworkManager.QueuedPacket> getPacketQueue() { return this.packetQueue; } // Paper - OBFHELPER // Akarin
private final Queue<PacketPlayOutMapChunk> pendingChunkQueue = Lists.newLinkedList(); // Akarin - remove packet queue
private final Queue<PacketPlayOutMapChunk> pendingChunkQueue = Queues.newConcurrentLinkedQueue(); // Akarin - remove packet queue
private final ReentrantReadWriteLock j = new ReentrantReadWriteLock();
public Channel channel;
public SocketAddress socketAddress; public void setSpoofedRemoteAddress(SocketAddress address) { this.socketAddress = address; } // Paper - OBFHELPER