added comments to better explain what is going on

This commit is contained in:
hyperdefined
2022-02-11 19:19:05 -05:00
parent adb1c637dc
commit e296c27a5b
12 changed files with 138 additions and 16 deletions

View File

@@ -75,6 +75,10 @@ public class PlayerFish implements Listener {
}
}
/**
* Updates a fishing rod's count.
* @param itemStack The fishing rod to update.
*/
private void updateFishCount(ItemStack itemStack) {
ItemMeta meta = itemStack.getItemMeta();
if (meta == null) {
@@ -129,6 +133,11 @@ public class PlayerFish implements Listener {
itemStack.setItemMeta(meta);
}
/**
* Adds "caught by" tags to newly fished items.
* @param itemStack The item to add lore to.
* @param owner The player who caught the item.
*/
private void addNewLore(ItemStack itemStack, Player owner) {
ItemMeta meta = itemStack.getItemMeta();
if (meta == null) {