9
0
mirror of https://github.com/PSYCHEER/VanillaCustomizer.git synced 2025-12-19 15:09:17 +00:00

Fixed conflict

[eco] Exception in packet listener com.willfp.eco.internal.spigot.proxy.v1_21_4.common.packet.display.PacketWindowItems for packet net.minecraft.network.protocol.game.ClientboundContainerSetContentPacket! [15:52:44 WARN]: java.lang.ClassCastException: class java.lang.String cannot be cast to class net.minecraft.network.chat.Component (java.lang.String is in module java.base of loader 'bootstrap'; net.minecraft.network.chat.Component is in unnamed module of loader java.net.URLClassLoader @5e91993f)
...
This commit is contained in:
PSYCHEER
2025-02-16 16:52:45 +01:00
parent 7c3b8490a9
commit e9388f4d04
3 changed files with 15 additions and 5 deletions

View File

@@ -90,6 +90,12 @@
<version>24.0.0</version> <version>24.0.0</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
<dependency>
<groupId>ca.bkaw</groupId>
<artifactId>paper-nms</artifactId>
<version>1.21.4-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies> </dependencies>

View File

@@ -45,14 +45,14 @@ public class LoreInsert implements IChange
int i = index; int i = index;
for (String line : lines) for (String line : lines)
{ {
loreNMS.add(i, Utils.legacyToNMS(IChange.replacePlaceholders(session, line))); loreNMS.add(i, Utils.jsonToNMS(IChange.replacePlaceholders(session, line)));
i++; i++;
} }
} }
else // If it's out of bounds I just append at the end. else // If it's out of bounds I just append at the end.
{ {
for (String line : lines) for (String line : lines)
loreNMS.add(Comp.legacyToJson(IChange.replacePlaceholders(session, line))); loreNMS.add(Utils.jsonToNMS(IChange.replacePlaceholders(session, line)));
} }
} }
@@ -101,11 +101,11 @@ public class LoreInsert implements IChange
if (loreNMS == null) if (loreNMS == null)
{ {
loreNMS = new ArrayList<>(); loreNMS = new ArrayList<>();
loreNMS.add(Utils.legacyToNMS(line)); loreNMS.add(Utils.jsonToNMS(line));
} }
else else
{ {
loreNMS.add(index, Utils.legacyToNMS(line)); loreNMS.add(index, Utils.jsonToNMS(line));
} }
nbt.setLore(loreNMS); nbt.setLore(loreNMS);

View File

@@ -2,7 +2,6 @@ package dev.lone.vanillacustomizer.utils;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import dev.lone.vanillacustomizer.Main; import dev.lone.vanillacustomizer.Main;
import dev.lone.vanillacustomizer.nms.NMS;
import org.apache.commons.io.FileUtils; import org.apache.commons.io.FileUtils;
import org.apache.commons.lang.Validate; import org.apache.commons.lang.Validate;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
@@ -30,6 +29,11 @@ import java.util.regex.Pattern;
/** /**
* 2020-01-08 LoneDev * 2020-01-08 LoneDev
*/ */
/**
* 2025-02-16 PSYCHEER
*/
@SuppressWarnings("unused") @SuppressWarnings("unused")
public class ConfigFile public class ConfigFile
{ {