Skip to content

Commit

Permalink
ServerVersion retrieve errors fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
unknown committed Apr 27, 2020
1 parent 0dd0444 commit 95ee18c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/java/me/purplex/packetevents/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import com.comphenix.tinyprotocol.*;
import io.netty.channel.Channel;
import me.purplex.packetevents.enums.ServerVersion;
import me.purplex.packetevents.events.packetevent.PacketSendEvent;
import me.purplex.packetevents.events.packetevent.ServerTickEvent;
import me.purplex.packetevents.events.packetevent.PacketReceiveEvent;
import me.purplex.packetevents.example.TestExample;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.event.*;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ public static ServerVersion getVersion() {
ArrayUtils.reverse(vals);
for(ServerVersion val : vals) {
String valName = val.name().substring(2).replace("_", ".");
if(Bukkit.getVersion().contains(valName)) {
if(Bukkit.getBukkitVersion().contains(valName)) {
System.out.println(val + " we got");
return val;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import me.purplex.packetevents.events.packetevent.PacketSendEvent;
import me.purplex.packetevents.exceptions.VersionNotFoundException;
import me.purplex.packetevents.packets.Packet;
import net.minecraft.server.v1_8_R1.*;
import org.bukkit.entity.Entity;

public class TestExample implements PacketListener {
Expand Down

0 comments on commit 95ee18c

Please sign in to comment.