Skip to content

Commit 807d545

Browse files
committed
Refactored code
1 parent 74f85fa commit 807d545

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

item/bukkit/src/main/java/it/angrybear/yagl/items/PersistentItem.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -159,19 +159,6 @@ public void click(final @NotNull Player player, final @NotNull ItemStack itemSta
159159
return this;
160160
}
161161

162-
/**
163-
* Tries to get the corresponding {@link PersistentItem} from the given {@link ItemStack}.
164-
*
165-
* @param itemStack the item stack
166-
* @return this persistent item
167-
*/
168-
public static @Nullable PersistentItem getPersistentItem(final @Nullable ItemStack itemStack) {
169-
if (itemStack == null) return null;
170-
for (final PersistentItem item : PERSISTENT_ITEMS)
171-
if (item.isSimilar(itemStack)) return item;
172-
return null;
173-
}
174-
175162
@Override
176163
public PersistentItem setMaterial(@NotNull Material material) {
177164
return (PersistentItem) super.setMaterial(material);
@@ -302,6 +289,19 @@ public PersistentItem copy() {
302289
return super.copy(PersistentItem.class);
303290
}
304291

292+
/**
293+
* Tries to get the corresponding {@link PersistentItem} from the given {@link ItemStack}.
294+
*
295+
* @param itemStack the item stack
296+
* @return this persistent item
297+
*/
298+
public static @Nullable PersistentItem getPersistentItem(final @Nullable ItemStack itemStack) {
299+
if (itemStack == null) return null;
300+
for (final PersistentItem item : PERSISTENT_ITEMS)
301+
if (item.isSimilar(itemStack)) return item;
302+
return null;
303+
}
304+
305305
/**
306306
* Clear persistent items.
307307
*/

0 commit comments

Comments
 (0)