mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2024-11-29 06:05:14 +01:00
d059af01b6
* Updated Upstream and Sidestream(s) (Paper/Purpur/AirplaneLite) Upstream/An Sidestream has released updates that appears to apply and compile correctly This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing. Paper Changes: fc4c0bc42 Reset shield blocking on dimension change 1c8b6065e Skip distance map update when spawning is disabled 091e6700f Added PlayerStonecutterRecipeSelectEvent fc885f966 Add toggle for always placing the dragon egg b3a6da3a7 Updated Upstream (Bukkit/CraftBukkit) 18ccc062d [Auto] Updated Upstream (Spigot) Purpur Changes: df9bd08 Config to use infinity bows without arrows (#149) 9d537bc Fix PlayerEditBookEvent not saving new book 3f8816d [ci-skip] Oops 5508728 [ci-skip] Add granny to funding 4c7ab70 Updated Upstream (Paper) 5eefb52 [ci-skip] Update Gradle to 6.8.1 AirplaneLite Changes: 459bb20 Remove patch 515fec7 Remove streams fc94d7b Correct launcher name 0b153bd Update gradle version * add Remove-streams.patch from AirplaneLite
45 lines
2.7 KiB
Diff
45 lines
2.7 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: l_MrBoom_l <admin@epserv.ru>
|
|
Date: Wed, 30 Sep 2020 18:20:12 +0300
|
|
Subject: [PATCH] Configurable flight checks
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
index aed9a2d151dad500e30d1871e059adec712fa450..2d10a3b5aa073ebc7e51beb428f707d6fbfc3001 100644
|
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
@@ -179,7 +179,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
|
++this.e;
|
|
this.processedMovePackets = this.receivedMovePackets;
|
|
if (this.B && !this.player.isSleeping()) {
|
|
- if (++this.C > 80) {
|
|
+ if (org.yatopiamc.yatopia.server.YatopiaConfig.checkFlying && ++this.C > 80) { // Yatopia
|
|
PlayerConnection.LOGGER.warn("{} was kicked for floating too long!", this.player.getDisplayName().getString());
|
|
this.disconnect(com.destroystokyo.paper.PaperConfig.flyingKickPlayerMessage); // Paper - use configurable kick message
|
|
return;
|
|
@@ -198,7 +198,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
|
this.w = this.r.locY();
|
|
this.x = this.r.locZ();
|
|
if (this.D && this.player.getRootVehicle().getRidingPassenger() == this.player) {
|
|
- if (++this.E > 80) {
|
|
+ if (org.yatopiamc.yatopia.server.YatopiaConfig.checkVehicleFlying && ++this.E > 80) { // Yatopia
|
|
PlayerConnection.LOGGER.warn("{} was kicked for floating a vehicle too long!", this.player.getDisplayName().getString());
|
|
this.disconnect(com.destroystokyo.paper.PaperConfig.flyingKickVehicleMessage); // Paper - use configurable kick message
|
|
return;
|
|
diff --git a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
|
|
index f6a8f3c4e92455eff806978d503751b6723ea858..81ab5afa7bd397266d2afe77426d2e629529aa1a 100644
|
|
--- a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
|
|
+++ b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
|
|
@@ -223,4 +223,11 @@ public class YatopiaConfig {
|
|
private static void fixFallDistance() {
|
|
fixFallDistance = getBoolean("settings.fixFallDistance", false);
|
|
}
|
|
+
|
|
+ public static boolean checkFlying = true;
|
|
+ public static boolean checkVehicleFlying = true;
|
|
+ private static void flightChecks() {
|
|
+ checkFlying = getBoolean("settings.checks.flight", checkFlying);
|
|
+ checkVehicleFlying = getBoolean("settings.checks.vehicle-flight", checkVehicleFlying);
|
|
+ }
|
|
}
|