// 我们把玩家脚下的location作为是原点O
Location location = player.getLocation();
for (int degree = 0; degree < 360; degree++) {
double radians = Math.toRadians(degree);
double x = Math.cos(radians);
double y = Math.sin(radians);
location.add(x, 0, y);
location.getWorld().playEffect(location, Effect.HAPPY_VILLAGER, 1);
location.subtract(x, 0, y);
} |