Add GoatHornEvent listener (stops spamming goat horns in spawn)
Implement GoatHornEvent to handle player interactions with goat horns. This feature sets a cooldown for goat horn items, if the player is near spawn or already has an active cooldown.
This commit is contained in:
parent
0c305e79e5
commit
c0c8cbbfa4
|
|
@ -29,8 +29,8 @@ public class GoatHornEvent implements Listener {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Location spawn = player.getLocation();
|
Location spawn = player.getLocation().clone();
|
||||||
spawn.set(0, 0, 0);
|
spawn.set(0, player.getY(), 0);
|
||||||
|
|
||||||
if (player.getLocation().distance(spawn) > 250) {
|
if (player.getLocation().distance(spawn) > 250) {
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user