Fix lava fishing
This commit is contained in:
parent
8d5c369877
commit
d96496d42e
|
|
@ -110,7 +110,8 @@ public class CatchFish implements Listener {
|
|||
return;
|
||||
}
|
||||
handleFishCaught(event);
|
||||
} else if (event.getState().equals(PlayerFishEvent.State.IN_GROUND)) {
|
||||
} else if (event.getState().equals(PlayerFishEvent.State.IN_GROUND) || event.getState().equals(PlayerFishEvent.State.REEL_IN)) {
|
||||
stopLavaFishStart(uuid);
|
||||
handleLavaFishCaught(event);
|
||||
} else {
|
||||
stopLavaFishStart(uuid);
|
||||
|
|
@ -174,6 +175,12 @@ public class CatchFish implements Listener {
|
|||
}
|
||||
|
||||
private void handleFishCaught(PlayerFishEvent event) {
|
||||
UUID uuid = event.getPlayer().getUniqueId();
|
||||
LavaFishing lavaFishing = activeLavaFishers.get(uuid);
|
||||
if (lavaFishing != null) {
|
||||
lavaFishing.cancel();
|
||||
activeLavaFishers.remove(uuid);
|
||||
}
|
||||
Entity caught = event.getCaught();
|
||||
if (!(caught instanceof Item item)) {
|
||||
logger.warning("% did not catch an item", event.getPlayer().getName());
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user