Skip to content

Commit

Permalink
Move
Browse files Browse the repository at this point in the history
  • Loading branch information
HaHaWTH committed Mar 16, 2024
1 parent 5904f2e commit 7c2319f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/io/wdsj/asw/listener/PlayerItemListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ public void onPlayerHeldItem(PlayerItemHeldEvent event) {
ItemStack item = player.getInventory().getItem(event.getNewSlot());
if (item != null && item.hasItemMeta()) {
ItemMeta meta = item.getItemMeta();
if (NORMAL_ITEM_META.contains(meta)) return;
if (meta != null && meta.hasDisplayName()) {
if (NORMAL_ITEM_META.contains(meta)) return;
String originalName = meta.getDisplayName();
long startTime = System.currentTimeMillis();
if (settingsManager.getProperty(PluginSettings.IGNORE_FORMAT_CODE)) originalName = originalName.replaceAll(Utils.getIgnoreFormatCodeRegex(), "");
Expand Down Expand Up @@ -79,8 +79,8 @@ public void onDrop(PlayerDropItemEvent event) {
ItemStack item = event.getItemDrop().getItemStack();
if (item.hasItemMeta()) {
ItemMeta meta = item.getItemMeta();
if (NORMAL_ITEM_META.contains(meta)) return;
if (meta != null && meta.hasDisplayName()) {
if (NORMAL_ITEM_META.contains(meta)) return;
String originalName = meta.getDisplayName();
long startTime = System.currentTimeMillis();
if (settingsManager.getProperty(PluginSettings.IGNORE_FORMAT_CODE)) originalName = originalName.replaceAll(Utils.getIgnoreFormatCodeRegex(), "");
Expand Down

0 comments on commit 7c2319f

Please sign in to comment.