Skip to content

Commit

Permalink
PotionTypes.getById works now
Browse files Browse the repository at this point in the history
  • Loading branch information
retrooper committed Oct 11, 2023
1 parent 709edd8 commit b48a91b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

package com.github.retrooper.packetevents.protocol.potion;

import com.github.retrooper.packetevents.PacketEvents;
import com.github.retrooper.packetevents.protocol.player.ClientVersion;
import com.github.retrooper.packetevents.resources.ResourceLocation;
import org.jetbrains.annotations.Nullable;
Expand Down Expand Up @@ -68,7 +69,7 @@ public static PotionType getByName(String name) {

@Deprecated
public static @Nullable PotionType getById(int id) {
return getById(id, com.github.retrooper.packetevents.manager.server.ServerVersion.ERROR);
return getById(id, PacketEvents.getAPI().getServerManager().getVersion().toClientVersion());
}

public static @Nullable PotionType getById(int id, com.github.retrooper.packetevents.manager.server.ServerVersion version) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,16 @@ public void onPacketLoginSend(PacketLoginSendEvent event) {

}


@Override
public void onPacketPlayReceive(PacketPlayReceiveEvent event) {
public void onPacketConfigReceive(PacketConfigReceiveEvent event) {
}

@Override
public void onPacketConfigReceive(PacketConfigReceiveEvent event) {
public void onPacketConfigSend(PacketConfigSendEvent event) {
}

@Override
public void onPacketConfigSend(PacketConfigSendEvent event) {
public void onPacketPlayReceive(PacketPlayReceiveEvent event) {
}

@Override
Expand Down

0 comments on commit b48a91b

Please sign in to comment.