Guest User

Untitled

a guest
Feb 11th, 2023
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. public void summonCircle(Location location, double size) {
  2. for (int d = 0; d <= 360; d += 1) { // 360 - заполненность формы
  3. Location particleLoc = new Location(location.getWorld(), location.getX(), location.getY(), location.getZ());
  4. particleLoc.setX(location.getX() + Math.cos(d) * size);
  5. particleLoc.setZ(location.getZ() + Math.sin(d) * size);
  6. Objects.requireNonNull(location.getWorld()).spawnParticle(Particle.REDSTONE, particleLoc, 20, new Particle.DustOptions(Color.RED, 1));
  7. }
  8. } public void GlaveRegion(Player p) {
  9. Task = Bukkit.getScheduler().scheduleSyncRepeatingTask(basecreate.getInstance(), () -> {
  10.  
  11. Location locate = new Location(p.getWorld(), plugin.getConfig().getDouble(id + ".base.coords.x"), plugin.getConfig().getDouble(id + ".base.coords.y"), plugin.getConfig().getDouble(id + ".base.coords.z"));
  12. summonCircle(locate, index);
  13. }, 0, 40);
  14. }
Advertisement
Add Comment
Please, Sign In to add comment