Skip to content

Commit

Permalink
Merge branch 'Gecolay:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreeam-qwq authored Apr 6, 2024
2 parents 70afd87 + da215a8 commit 8b85489
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion core/src/main/java/dev/geco/gsit/link/BStatsLink.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ private void appendPlatformData(JsonObjectBuilder builder) {
builder.appendField("playerAmount", getPlayerAmount());
builder.appendField("onlineMode", Bukkit.getOnlineMode() ? 1 : 0);
builder.appendField("bukkitVersion", Bukkit.getVersion());
builder.appendField("bukkitName", !Bukkit.getName().equalsIgnoreCase("Unknown") ? Bukkit.getName() : (Bukkit.getVersion().split("-").length > 1 ? Bukkit.getVersion().split("-")[1] : Bukkit.getName()));
builder.appendField("bukkitName", Bukkit.getName());
builder.appendField("javaVersion", System.getProperty("java.version"));
builder.appendField("osName", System.getProperty("os.name"));
builder.appendField("osArch", System.getProperty("os.arch"));
Expand Down
5 changes: 1 addition & 4 deletions core/src/main/java/dev/geco/gsit/link/ViaVersionLink.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,16 @@ public class ViaVersionLink {

private final GSitMain GPM;

private final ViaAPI VIA_API;

private final int ORIGIN_VERSION;

public ViaVersionLink(GSitMain GPluginMain) {
GPM = GPluginMain;
VIA_API = Via.getAPI();
ORIGIN_VERSION = GPM.getPackageUtil().getProtocolVersion();
}

public double getVersionOffset(Entity Entity) {
if(!(Entity instanceof Player)) return 0;
int playerVersion = VIA_API.getPlayerVersion(Entity.getUniqueId());
int playerVersion = Via.getAPI().getPlayerVersion(Entity.getUniqueId());
if(playerVersion == -1) return 0;
if(ORIGIN_VERSION <= 763) {
if(playerVersion >= 764) return 0.25d;
Expand Down

0 comments on commit 8b85489

Please sign in to comment.