mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-15 07:05:32 +01:00
Don't fire xp spawn events for fishing where xp was already 0.
Dedicated to @mikroskeem who let me forget about this.
This commit is contained in:
parent
2ed60eba02
commit
0cb84927a3
@ -761,7 +761,7 @@ public void onPlayerFish(PlayerFishEvent event) {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
} else if (event.getState() == PlayerFishEvent.State.CAUGHT_FISH) {
|
||||
if (Events.fireAndTestCancel(new SpawnEntityEvent(event, create(event.getPlayer(), event.getHook()), event.getHook().getLocation(), EntityType.EXPERIENCE_ORB))) {
|
||||
if (event.getExpToDrop() > 0 && Events.fireAndTestCancel(new SpawnEntityEvent(event, create(event.getPlayer(), event.getHook()), event.getHook().getLocation(), EntityType.EXPERIENCE_ORB))) {
|
||||
event.setExpToDrop(0);
|
||||
}
|
||||
} else if (event.getState() == PlayerFishEvent.State.CAUGHT_ENTITY) {
|
||||
|
Loading…
Reference in New Issue
Block a user