SteamWar/BauSystem
Archiviert
13
0

Update TPSLimit_12

Update TPSLimit_15
Dieser Commit ist enthalten in:
jojo 2020-12-26 22:42:27 +01:00
Ursprung d316b606fd
Commit ac399896fc
2 geänderte Dateien mit 8 neuen und 5 gelöschten Zeilen

Datei anzeigen

@ -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<Packet<?>> packets = new HashSet<>();
private static List<Packet<?>> packets = new ArrayList<>();
static void createTickCache(World world) {
packets.clear();
@ -49,7 +51,7 @@ class TPSLimit_12 {
sendPacketsToPlayer(packets);
}
private static void sendPacketsToPlayer(Set<? extends Packet<?>> packets) {
private static void sendPacketsToPlayer(List<? extends Packet<?>> packets) {
Bukkit.getOnlinePlayers().forEach(player -> {
PlayerConnection connection = ((CraftPlayer)player).getHandle().playerConnection;
for (Packet<?> p : packets) {

Datei anzeigen

@ -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<Packet<?>> packets = new HashSet<>();
private static List<Packet<?>> 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<? extends Packet<?>> packets) {
private static void sendPacketsToPlayer(List<? extends Packet<?>> packets) {
Bukkit.getOnlinePlayers().forEach(player -> {
PlayerConnection connection = ((CraftPlayer)player).getHandle().playerConnection;
for (Packet<?> p : packets) {