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:
1 parent
0c305e79e5
commit
c0c8cbbfa4
1 file changed
+2
-2
@@ -29,8 +29,8 @@ public class GoatHornEvent implements Listener {
|
||||
return;
|
||||
}
|
||||
|
||||
Location spawn = player.getLocation();
|
||||
spawn.set(0, 0, 0);
|
||||
Location spawn = player.getLocation().clone();
|
||||
spawn.set(0, player.getY(), 0);
|
||||
|
||||
if (player.getLocation().distance(spawn) > 250) {
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user