Update from Git Manager GUI

This commit is contained in:
2026-01-23 10:43:53 +01:00
parent 9fd0690ba8
commit 5f2c05d85e
13 changed files with 984 additions and 114 deletions

View File

@@ -0,0 +1,32 @@
package de.nexuslobby.modules.gadgets;
import org.bukkit.Particle;
import org.bukkit.Sound;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.bukkit.util.Vector;
public class ShieldTask {
public static void handleShield(Player owner) {
// Erzeuge einen Partikel-Ring um den Spieler
for (double i = 0; i < Math.PI * 2; i += Math.PI / 8) {
double x = Math.cos(i) * 2.2;
double z = Math.sin(i) * 2.2;
owner.getWorld().spawnParticle(Particle.WITCH, owner.getLocation().add(x, 0.5, z), 1, 0, 0, 0, 0);
}
// Stoße andere Spieler weg
for (Entity entity : owner.getNearbyEntities(2.2, 2.0, 2.2)) {
if (entity instanceof Player && entity != owner) {
Player target = (Player) entity;
Vector direction = target.getLocation().toVector().subtract(owner.getLocation().toVector()).normalize();
direction.multiply(0.4).setY(0.2);
target.setVelocity(direction);
target.playSound(target.getLocation(), Sound.ENTITY_CHICKEN_EGG, 0.5f, 0.5f);
}
}
}
}