Add protocol version for 1.20
This commit is contained in:
parent
1537c7e236
commit
fbf6120876
|
@ -87,6 +87,7 @@ public final class MinecraftProtocolVersion {
|
|||
map.put(new MinecraftVersion(1, 19, 3), 761);
|
||||
map.put(new MinecraftVersion(1, 19, 4), 762);
|
||||
|
||||
map.put(new MinecraftVersion(1, 20, 0), 763);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
|
|
@ -15,8 +15,9 @@
|
|||
* 02111-1307 USA
|
||||
*/
|
||||
|
||||
package com.comphenix.protocol;
|
||||
package com.comphenix.protocol.utility;
|
||||
|
||||
import com.comphenix.protocol.BukkitInitialization;
|
||||
import com.comphenix.protocol.utility.MinecraftVersion;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
@ -51,6 +52,12 @@ class MinecraftVersionTest {
|
|||
assertEquals(MinecraftVersion.TRAILS_AND_TAILS, MinecraftVersion.getCurrentVersion());
|
||||
}
|
||||
|
||||
@Test
|
||||
void testCurrentProtocol() {
|
||||
// MIN_VALUE is returned when the current version is not supported
|
||||
assertNotEquals(MinecraftProtocolVersion.getCurrentVersion(), Integer.MIN_VALUE);
|
||||
}
|
||||
|
||||
@Test
|
||||
void testParsing() {
|
||||
assertEquals("1.4.3", MinecraftVersion.extractVersion("CraftBukkit R3.0 (MC: 1.4.3)"));
|
Loading…
Reference in New Issue