diff --git a/all/pom.xml b/all/pom.xml index c9c3556b..c470c4e7 100644 --- a/all/pom.xml +++ b/all/pom.xml @@ -15,7 +15,7 @@ viabackwards-parent nl.matsv - 2.3.1 + 2.3.2-DEV 4.0.0 diff --git a/bukkit/pom.xml b/bukkit/pom.xml index c46d0199..1ec0e931 100644 --- a/bukkit/pom.xml +++ b/bukkit/pom.xml @@ -15,7 +15,7 @@ viabackwards-parent nl.matsv - 2.3.1 + 2.3.2-DEV 4.0.0 diff --git a/bungee/pom.xml b/bungee/pom.xml index 13339a85..45e927d0 100644 --- a/bungee/pom.xml +++ b/bungee/pom.xml @@ -15,7 +15,7 @@ viabackwards-parent nl.matsv - 2.3.1 + 2.3.2-DEV 4.0.0 diff --git a/core/pom.xml b/core/pom.xml index e2b66db6..5262b834 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -15,7 +15,7 @@ viabackwards-parent nl.matsv - 2.3.1 + 2.3.2-DEV 4.0.0 diff --git a/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_12_1to1_12_2/KeepAliveTracker.java b/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_12_1to1_12_2/KeepAliveTracker.java new file mode 100644 index 00000000..300d2bc7 --- /dev/null +++ b/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_12_1to1_12_2/KeepAliveTracker.java @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2016 Matsv + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package nl.matsv.viabackwards.protocol.protocol1_12_1to1_12_2; + +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; +import us.myles.ViaVersion.api.data.StoredObject; +import us.myles.ViaVersion.api.data.UserConnection; + +@Getter +@Setter +@ToString +public class KeepAliveTracker extends StoredObject { + private long keepAlive = Integer.MAX_VALUE; + + public KeepAliveTracker(UserConnection user) { + super(user); + } +} diff --git a/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_12_1to1_12_2/Protocol1_12_1To1_12_2.java b/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_12_1to1_12_2/Protocol1_12_1To1_12_2.java index 67d5eb18..820f21b3 100644 --- a/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_12_1to1_12_2/Protocol1_12_1To1_12_2.java +++ b/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_12_1to1_12_2/Protocol1_12_1To1_12_2.java @@ -11,7 +11,6 @@ package nl.matsv.viabackwards.protocol.protocol1_12_1to1_12_2; import nl.matsv.viabackwards.api.BackwardsProtocol; -import nl.matsv.viabackwards.protocol.protocol1_12to1_12_1.KeepAliveTracker; import us.myles.ViaVersion.api.PacketWrapper; import us.myles.ViaVersion.api.data.UserConnection; import us.myles.ViaVersion.api.remapper.PacketHandler; @@ -36,7 +35,8 @@ public class Protocol1_12_1To1_12_2 extends BackwardsProtocol { } }); } - }); // Keep alive + }); + // Incoming // 0xb - Keep alive registerIncoming(State.PLAY, 0xb, 0xb, new PacketRemapper() { @@ -53,7 +53,7 @@ public class Protocol1_12_1To1_12_2 extends BackwardsProtocol { } packetWrapper.write(Type.LONG, realKeepAlive); // Reset KeepAliveTracker (to prevent sending same valid value in a row causing a timeout) - packetWrapper.user().get(KeepAliveTracker.class).setKeepAlive(Long.MIN_VALUE); + packetWrapper.user().get(KeepAliveTracker.class).setKeepAlive(Integer.MAX_VALUE); } }); } diff --git a/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_12to1_12_1/KeepAliveTracker.java b/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_12to1_12_1/KeepAliveTracker.java deleted file mode 100644 index 07b02154..00000000 --- a/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_12to1_12_1/KeepAliveTracker.java +++ /dev/null @@ -1,18 +0,0 @@ -package nl.matsv.viabackwards.protocol.protocol1_12to1_12_1; - -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; -import us.myles.ViaVersion.api.data.StoredObject; -import us.myles.ViaVersion.api.data.UserConnection; - -@Getter -@Setter -@ToString -public class KeepAliveTracker extends StoredObject { - private long keepAlive; - - public KeepAliveTracker(UserConnection user) { - super(user); - } -} diff --git a/pom.xml b/pom.xml index 54cbd6c2..6a9fe0c8 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,7 @@ nl.matsv viabackwards-parent - 2.3.1 + 2.3.2-DEV pom Allow newer clients to join older server versions. diff --git a/sponge/pom.xml b/sponge/pom.xml index f7ececb2..200b3c10 100644 --- a/sponge/pom.xml +++ b/sponge/pom.xml @@ -15,7 +15,7 @@ viabackwards-parent nl.matsv - 2.3.1 + 2.3.2-DEV 4.0.0