From ac399896fc59d6959ce7a8b3191c00c7af3ea880 Mon Sep 17 00:00:00 2001 From: jojo Date: Sat, 26 Dec 2020 22:42:27 +0100 Subject: [PATCH] Update TPSLimit_12 Update TPSLimit_15 --- .../src/de/steamwar/bausystem/commands/TPSLimit_12.java | 6 ++++-- .../src/de/steamwar/bausystem/commands/TPSLimit_15.java | 7 ++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/BauSystem_12/src/de/steamwar/bausystem/commands/TPSLimit_12.java b/BauSystem_12/src/de/steamwar/bausystem/commands/TPSLimit_12.java index b84be05..3393ece 100644 --- a/BauSystem_12/src/de/steamwar/bausystem/commands/TPSLimit_12.java +++ b/BauSystem_12/src/de/steamwar/bausystem/commands/TPSLimit_12.java @@ -27,12 +27,14 @@ import org.bukkit.craftbukkit.v1_12_R1.entity.CraftPlayer; import org.bukkit.entity.FallingBlock; import org.bukkit.entity.TNTPrimed; +import java.util.ArrayList; import java.util.HashSet; +import java.util.List; import java.util.Set; class TPSLimit_12 { - private static Set> packets = new HashSet<>(); + private static List> packets = new ArrayList<>(); static void createTickCache(World world) { packets.clear(); @@ -49,7 +51,7 @@ class TPSLimit_12 { sendPacketsToPlayer(packets); } - private static void sendPacketsToPlayer(Set> packets) { + private static void sendPacketsToPlayer(List> packets) { Bukkit.getOnlinePlayers().forEach(player -> { PlayerConnection connection = ((CraftPlayer)player).getHandle().playerConnection; for (Packet p : packets) { diff --git a/BauSystem_15/src/de/steamwar/bausystem/commands/TPSLimit_15.java b/BauSystem_15/src/de/steamwar/bausystem/commands/TPSLimit_15.java index 00855e8..75b42f4 100644 --- a/BauSystem_15/src/de/steamwar/bausystem/commands/TPSLimit_15.java +++ b/BauSystem_15/src/de/steamwar/bausystem/commands/TPSLimit_15.java @@ -27,12 +27,13 @@ import org.bukkit.craftbukkit.v1_15_R1.entity.CraftPlayer; import org.bukkit.entity.FallingBlock; import org.bukkit.entity.TNTPrimed; -import java.util.HashSet; +import java.util.ArrayList; +import java.util.List; import java.util.Set; class TPSLimit_15 { - private static Set> packets = new HashSet<>(); + private static List> packets = new ArrayList<>(); private static final Vec3D noMotion = new Vec3D(0, 0, 0); static void createTickCache(World world) { @@ -50,7 +51,7 @@ class TPSLimit_15 { sendPacketsToPlayer(packets); } - private static void sendPacketsToPlayer(Set> packets) { + private static void sendPacketsToPlayer(List> packets) { Bukkit.getOnlinePlayers().forEach(player -> { PlayerConnection connection = ((CraftPlayer)player).getHandle().playerConnection; for (Packet p : packets) {