mirror of
https://github.com/songoda/SongodaCore.git
synced 2025-02-03 05:01:27 +01:00
Merge branch 'development'
This commit is contained in:
commit
0bdb0af890
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>SongodaCore-Modules</artifactId>
|
||||
<version>2.5.11</version>
|
||||
<version>2.5.12</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
@ -22,9 +22,9 @@
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>us.myles.viaversion-bukkit</groupId>
|
||||
<artifactId>ViaVersion</artifactId>
|
||||
<version>2.1.3</version>
|
||||
<groupId>com.viaversion</groupId>
|
||||
<artifactId>viaversion-api</artifactId>
|
||||
<version>4.0.1</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.songoda.core.compatibility;
|
||||
|
||||
import com.viaversion.viaversion.api.Via;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
@ -12,8 +13,7 @@ import java.util.UUID;
|
||||
* NOTE: this is automatically initialized through SongodaCore
|
||||
*/
|
||||
public class ClientVersion {
|
||||
|
||||
static HashMap<UUID, ServerVersion> players = new HashMap();
|
||||
static HashMap<UUID, ServerVersion> players = new HashMap<>();
|
||||
|
||||
/**
|
||||
* Check to see what client version this player is connected to the server
|
||||
@ -28,6 +28,7 @@ public class ClientVersion {
|
||||
if (player == null || !players.containsKey(player.getUniqueId())) {
|
||||
return ServerVersion.getServerVersion();
|
||||
}
|
||||
|
||||
return players.get(player.getUniqueId());
|
||||
}
|
||||
|
||||
@ -51,7 +52,7 @@ public class ClientVersion {
|
||||
public static void onLoginVia(Player p, JavaPlugin plugin) {
|
||||
Bukkit.getScheduler().runTaskLater(plugin, () -> {
|
||||
if (p.isOnline()) {
|
||||
final int version = us.myles.ViaVersion.api.Via.getAPI().getPlayerVersion(p.getUniqueId());
|
||||
final int version = Via.getAPI().getPlayerVersion(p.getUniqueId());
|
||||
players.put(p.getUniqueId(), protocolToVersion(version));
|
||||
}
|
||||
}, 20);
|
||||
|
@ -4,7 +4,6 @@ import org.apache.commons.lang.ArrayUtils;
|
||||
import org.bukkit.Bukkit;
|
||||
|
||||
public enum ServerVersion {
|
||||
|
||||
UNKNOWN, V1_7, V1_8, V1_9, V1_10, V1_11, V1_12, V1_13, V1_14, V1_15, V1_16, V1_17, V1_18, V1_19, V1_20, V1_21;
|
||||
|
||||
private final static String serverPackagePath = Bukkit.getServer().getClass().getPackage().getName();
|
||||
@ -18,6 +17,7 @@ public enum ServerVersion {
|
||||
return version;
|
||||
}
|
||||
}
|
||||
|
||||
return UNKNOWN;
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>SongodaCore-Modules</artifactId>
|
||||
<version>2.5.11</version>
|
||||
<version>2.5.12</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
@ -53,7 +53,7 @@ public class SongodaCore {
|
||||
/**
|
||||
* This has been added as of Rev 6
|
||||
*/
|
||||
private final static String coreVersion = "2.5.11";
|
||||
private final static String coreVersion = "2.5.12";
|
||||
|
||||
/**
|
||||
* This is specific to the website api
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>SongodaCore-Modules</artifactId>
|
||||
<version>2.5.11</version>
|
||||
<version>2.5.12</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
@ -27,7 +27,8 @@ public interface SSpawner {
|
||||
ILLUSIONER("illusion_illager", "IllusionIllager"),
|
||||
IRON_GOLEM("villager_golem", "VillagerGolem"),
|
||||
MUSHROOM_COW("mooshroom", "MushroomCow"),
|
||||
MAGMA_CUBE("magma_cube", "LavaSlime");
|
||||
MAGMA_CUBE("magma_cube", "LavaSlime"),
|
||||
CAVE_SPIDER("cave_spider", "CaveSpider");
|
||||
|
||||
private final String lower;
|
||||
private final String upper;
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>SongodaCore-Modules</artifactId>
|
||||
<version>2.5.11</version>
|
||||
<version>2.5.12</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>SongodaCore-Modules</artifactId>
|
||||
<version>2.5.11</version>
|
||||
<version>2.5.12</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>SongodaCore-Modules</artifactId>
|
||||
<version>2.5.11</version>
|
||||
<version>2.5.12</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>SongodaCore-Modules</artifactId>
|
||||
<version>2.5.11</version>
|
||||
<version>2.5.12</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>SongodaCore-Modules</artifactId>
|
||||
<version>2.5.11</version>
|
||||
<version>2.5.12</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>SongodaCore-Modules</artifactId>
|
||||
<version>2.5.11</version>
|
||||
<version>2.5.12</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>SongodaCore-Modules</artifactId>
|
||||
<version>2.5.11</version>
|
||||
<version>2.5.12</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>SongodaCore-Modules</artifactId>
|
||||
<version>2.5.11</version>
|
||||
<version>2.5.12</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>SongodaCore-Modules</artifactId>
|
||||
<version>2.5.11</version>
|
||||
<version>2.5.12</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>SongodaCore-Modules</artifactId>
|
||||
<version>2.5.11</version>
|
||||
<version>2.5.12</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>SongodaCore-Modules</artifactId>
|
||||
<version>2.5.11</version>
|
||||
<version>2.5.12</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>SongodaCore-Modules</artifactId>
|
||||
<version>2.5.11</version>
|
||||
<version>2.5.12</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>SongodaCore-Modules</artifactId>
|
||||
<version>2.5.11</version>
|
||||
<version>2.5.12</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>SongodaCore-Modules</artifactId>
|
||||
<version>2.5.11</version>
|
||||
<version>2.5.12</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>SongodaCore-Modules</artifactId>
|
||||
<version>2.5.11</version>
|
||||
<version>2.5.12</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>SongodaCore-Modules</artifactId>
|
||||
<version>2.5.11</version>
|
||||
<version>2.5.12</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user