Skip to content

Commit 2ebcf83

Browse files
committed
style(handler): Made variables final when possible.
1 parent 2abc1af commit 2ebcf83

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/main/java/fr/hashtek/spigot/hashgui/handler/click/HashGuiClick.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ public HashGuiClick addClickHandler(HashItem item)
5555
if (clickHandlers == null || clickHandlers.isEmpty())
5656
return this;
5757

58-
ItemMeta meta = item.getItemStack().getItemMeta();
59-
String itemName = meta.getDisplayName();
58+
final ItemMeta meta = item.getItemStack().getItemMeta();
59+
final String itemName = meta.getDisplayName();
6060

6161
for (ClickHandler handler : item.getClickHandlers())
6262
this.addClickHandler(itemName, handler);

src/main/java/fr/hashtek/spigot/hashgui/handler/hold/HashGuiHold.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ public HashGuiHold addHoldHandler(HashItem item)
5858
if (clickHandlers == null || clickHandlers.isEmpty())
5959
return this;
6060

61-
ItemMeta meta = item.getItemStack().getItemMeta();
62-
String itemName = meta.getDisplayName();
61+
final ItemMeta meta = item.getItemStack().getItemMeta();
62+
final String itemName = meta.getDisplayName();
6363

6464
for (HoldHandler handler : item.getHoldHandlers())
6565
this.addHoldHandler(itemName, handler);

src/main/java/fr/hashtek/spigot/hashgui/handler/interact/HashGuiInteraction.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ public HashGuiInteraction addInteractHandler(HashItem item)
5555
if (interactHandler == null || interactHandler.isEmpty())
5656
return this;
5757

58-
ItemMeta meta = item.getItemStack().getItemMeta();
59-
String itemName = meta.getDisplayName();
58+
final ItemMeta meta = item.getItemStack().getItemMeta();
59+
final String itemName = meta.getDisplayName();
6060

6161
for (InteractHandler handler: item.getInteractHandlers())
6262
this.addInteractHandler(itemName, handler);

0 commit comments

Comments
 (0)