Skip to content

Commit

Permalink
Minor display change
Browse files Browse the repository at this point in the history
  • Loading branch information
WillFP committed Aug 12, 2021
1 parent e053514 commit 378218b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,6 @@ public ItemStack display(@NotNull final ItemStack itemStack) {
*/
public ItemStack display(@NotNull final ItemStack itemStack,
@Nullable final Player player) {
if (!itemStack.hasItemMeta()) {
return itemStack; // return early if there's no customization of the item
}

Map<String, Object[]> pluginVarArgs = new HashMap<>();

for (DisplayPriority priority : DisplayPriority.values()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public interface SlotModifier {
* @param menu The menu.
* @param previous The previous ItemStack.
*/
void provide(@NotNull Player player,
@NotNull Menu menu,
@NotNull ItemStack previous);
void modify(@NotNull Player player,
@NotNull Menu menu,
@NotNull ItemStack previous);
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ open class EcoSlot(
override fun getItemStack(player: Player): ItemStack {
val menu = MenuHandler.getMenu(player.openInventory.topInventory)!!
val prev = provider.provide(player, menu)
modifier.provide(player, menu, prev)
modifier.modify(player, menu, prev)
return prev
}

Expand All @@ -48,7 +48,7 @@ open class EcoSlot(
menu: Menu
): ItemStack {
val prev = provider.provide(player, menu)
modifier.provide(player, menu, prev)
modifier.modify(player, menu, prev)
return prev
}

Expand Down

0 comments on commit 378218b

Please sign in to comment.