This commit is contained in:
yaohunya 2024-08-24 01:13:21 +08:00
parent a9643a51b6
commit f60b96e601
2 changed files with 6 additions and 1 deletions

View File

@ -67,5 +67,10 @@
<version>1.12.2-R0.1-SNAPSHOT</version> <version>1.12.2-R0.1-SNAPSHOT</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency>
<groupId>com.yaohun.nbtapi</groupId>
<artifactId>NBT-API</artifactId>
<version>1.12.2</version>
</dependency>
</dependencies> </dependencies>
</project> </project>

View File

@ -117,6 +117,7 @@ public class ItemStackUtil {
} }
} }
} }
lore.set(index,newLore);
Iterator<String> iterator = lore.iterator(); Iterator<String> iterator = lore.iterator();
while (iterator.hasNext()) { while (iterator.hasNext()) {
String s = iterator.next(); String s = iterator.next();
@ -124,7 +125,6 @@ public class ItemStackUtil {
iterator.remove(); iterator.remove();
} }
} }
lore.add(newLore);
itemMeta.setLore(lore); itemMeta.setLore(lore);
itemStack.setItemMeta(itemMeta); itemStack.setItemMeta(itemMeta);
return itemStack; return itemStack;