3 Commits

Author SHA1 Message Date
74d59bf71b Bump version for release
All checks were successful
EpicKnarvik97/Books-Without-Borders/pipeline/head This commit looks good
2025-07-28 04:18:54 +02:00
a1ed6b9566 Re-implements depreciated enchantment key getting
All checks were successful
EpicKnarvik97/Books-Without-Borders/pipeline/head This commit looks good
2025-07-28 04:15:53 +02:00
3095586d2b Bumps version for development
All checks were successful
EpicKnarvik97/Books-Without-Borders/pipeline/head This commit looks good
2025-07-27 21:03:15 +02:00
2 changed files with 3 additions and 8 deletions

View File

@@ -6,7 +6,7 @@
<groupId>net.knarcraft</groupId> <groupId>net.knarcraft</groupId>
<artifactId>BooksWithoutBorders</artifactId> <artifactId>BooksWithoutBorders</artifactId>
<version>1.3.6</version> <version>1.3.8</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<licenses> <licenses>

View File

@@ -3,7 +3,6 @@ package net.knarcraft.bookswithoutborders.listener;
import net.knarcraft.bookswithoutborders.config.BooksWithoutBordersConfig; import net.knarcraft.bookswithoutborders.config.BooksWithoutBordersConfig;
import net.knarcraft.bookswithoutborders.utility.IntegerToRomanConverter; import net.knarcraft.bookswithoutborders.utility.IntegerToRomanConverter;
import net.md_5.bungee.api.ChatColor; import net.md_5.bungee.api.ChatColor;
import org.bukkit.NamespacedKey;
import org.bukkit.block.ChiseledBookshelf; import org.bukkit.block.ChiseledBookshelf;
import org.bukkit.enchantments.Enchantment; import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
@@ -141,12 +140,8 @@ public class BookshelfListener implements Listener {
* @return <p>The prettified enchantment name</p> * @return <p>The prettified enchantment name</p>
*/ */
private String getEnchantmentName(Enchantment enchantment) { private String getEnchantmentName(Enchantment enchantment) {
NamespacedKey key = enchantment.getKeyOrNull(); // Note: While depreciated, changing this is incompatible with Paper
if (key != null) { return uppercaseFirst(enchantment.getKey().getKey().replace("_", " "));
return uppercaseFirst(key.getKey().replace("_", " "));
} else {
return "Unknown Enchantment";
}
} }
/** /**