Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
74d59bf71b | |||
a1ed6b9566 | |||
3095586d2b |
2
pom.xml
2
pom.xml
@@ -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>
|
||||||
|
@@ -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";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user