mirror of
https://github.com/HibiscusMC/HibiscusCommons.git
synced 2026-01-06 15:51:55 +00:00
fix: CustomFishing getEntity is can be null, closes #7
This commit is contained in:
@@ -16,6 +16,7 @@ public class HookCustomFishing extends Hook {
|
||||
|
||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||
public void onPlayerFish(FishingLootSpawnEvent event) {
|
||||
if (event.getEntity() == null) return;
|
||||
if (!(event.getEntity() instanceof Item item)) return;
|
||||
HibiscusPluginFishEvent newEvent = new HibiscusPluginFishEvent(this, event.getPlayer(), item.getItemStack());
|
||||
Bukkit.getPluginManager().callEvent(newEvent);
|
||||
|
||||
Reference in New Issue
Block a user