File tree Expand file tree Collapse file tree
addon/plan/src/main/java/com/ghostchu/quickshop/addon/plan/util
java/com/ghostchu/quickshop/compatibility/oraxen Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,8 +49,12 @@ public String getItemName(@NotNull final DataRecord dataRecord) {
4949 return "[Failed to deserialize]" ;
5050 }
5151 String name = CommonUtil .prettifyText (stack .getType ().name ());
52- if (stack .getItemMeta () != null && stack .getItemMeta ().hasDisplayName ()) {
53- name = stack .getItemMeta ().getDisplayName ();
52+ if (stack .getItemMeta () != null ) {
53+ if (stack .getItemMeta ().hasItemName ()) {
54+ name = stack .getItemMeta ().getItemName ();
55+ } else if (stack .getItemMeta ().hasDisplayName ()) {
56+ name = stack .getItemMeta ().getDisplayName ();
57+ }
5458 }
5559 return HtmlEscapers .htmlEscaper ().escape (name );
5660 }
@@ -59,8 +63,12 @@ public String getItemName(@NotNull final DataRecord dataRecord) {
5963 public String getItemName (@ NotNull final ItemStack stack ) {
6064
6165 String name = CommonUtil .prettifyText (stack .getType ().name ());
62- if (stack .getItemMeta () != null && stack .getItemMeta ().hasDisplayName ()) {
63- name = stack .getItemMeta ().getDisplayName ();
66+ if (stack .getItemMeta () != null ) {
67+ if (stack .getItemMeta ().hasItemName ()) {
68+ name = stack .getItemMeta ().getItemName ();
69+ } else if (stack .getItemMeta ().hasDisplayName ()) {
70+ name = stack .getItemMeta ().getDisplayName ();
71+ }
6472 }
6573 return HtmlEscapers .htmlEscaper ().escape (name );
6674 }
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 470470 <module >compatibility/voidchest</module >
471471 <module >compatibility/worldedit</module >
472472 <module >compatibility/worldguard</module >
473- <module >compatibility/oraxen</module >
474473 </modules >
475474
476475</project >
You can’t perform that action at this time.
0 commit comments