Packet changes
This commit is contained in:
@@ -24,7 +24,7 @@ public class PacketAutoRecipe extends AbstractPacketAdapter {
|
||||
@Override
|
||||
public void onSend(@NotNull final PacketContainer packet,
|
||||
@NotNull final Player player) {
|
||||
if (!EcoPlugin.LOADED_ECO_PLUGINS.contains(packet.getMinecraftKeys().getValues().get(0).getFullKey().split(":")[0])) {
|
||||
if (!EcoPlugin.getPluginNames().contains(packet.getMinecraftKeys().getValues().get(0).getFullKey().split(":")[0])) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -34,6 +34,11 @@ public class PacketOpenWindowMerchant extends AbstractPacketAdapter {
|
||||
@NotNull final PacketEvent event) {
|
||||
List<MerchantRecipe> recipes = new ArrayList<>();
|
||||
|
||||
|
||||
/*
|
||||
This awful, awful bit of code exists to fix a bug that existed in EcoEnchants
|
||||
for too many versions.
|
||||
*/
|
||||
if (this.getPlugin().getConfigYml().getBool("villager-display-fix")) {
|
||||
for (MerchantRecipe recipe : packet.getMerchantRecipeLists().read(0)) {
|
||||
ItemStack result = recipe.getResult();
|
||||
|
||||
Reference in New Issue
Block a user