Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
gecolay committed Apr 4, 2024
1 parent 96e9f0d commit da215a8
Showing 1 changed file with 1 addition and 4 deletions.
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 da215a8

Please sign in to comment.