From dd3bd868a9384b1e3b8071960f3fcaf64b5df285 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Sat, 16 Apr 2022 18:48:42 +0200 Subject: [PATCH] Remove unused features Signed-off-by: yoyosource --- .../bausystem/features/warp/Moon.java | 59 ------------------- .../bausystem/features/warp/WarpCommand.java | 5 -- 2 files changed, 64 deletions(-) delete mode 100644 BauSystem_Main/src/de/steamwar/bausystem/features/warp/Moon.java diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/warp/Moon.java b/BauSystem_Main/src/de/steamwar/bausystem/features/warp/Moon.java deleted file mode 100644 index a70909c9..00000000 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/warp/Moon.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * This file is a part of the SteamWar software. - * - * Copyright (C) 2021 SteamWar.de-Serverteam - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ - -package de.steamwar.bausystem.features.warp; - -import de.steamwar.bausystem.BauSystem; -import de.steamwar.inventory.SWItem; -import lombok.experimental.UtilityClass; -import org.bukkit.Bukkit; -import org.bukkit.Material; -import org.bukkit.Particle; -import org.bukkit.entity.Player; -import org.bukkit.potion.PotionEffect; -import org.bukkit.potion.PotionEffectType; -import org.bukkit.util.Vector; - -import java.util.concurrent.atomic.AtomicInteger; - -@UtilityClass -public class Moon { - - public static void startMoon(Player player) { - player.getInventory().setHelmet(new SWItem(Material.GLASS, BauSystem.MESSAGE.parse("WARP_MOON_ITEM_NAME", player)).getItemStack()); - AtomicInteger countDown = new AtomicInteger(5); - Bukkit.getScheduler().runTaskTimer(BauSystem.getInstance(), bukkitTask -> { - if (countDown.get() == 0) { - AtomicInteger iter = new AtomicInteger(1000); - Bukkit.getScheduler().runTaskTimer(BauSystem.getInstance(), bukkitTask1 -> { - if (player.getLocation().getY() > 300 || iter.getAndDecrement() <= 0) { - player.addPotionEffect(new PotionEffect(PotionEffectType.SLOW_FALLING, 60 * 5 * 20, 1, false, false)); - bukkitTask1.cancel(); - } else { - player.setVelocity(player.getVelocity().add(new Vector(0, 0.2, 0))); - player.getWorld().spawnParticle(Particle.FLAME, player.getLocation(), 5); - } - }, 0, 1); - bukkitTask.cancel(); - } else { - BauSystem.MESSAGE.sendPrefixless("WARP_MOON_COUNTDOOWN", player, countDown.getAndDecrement()); - } - }, 0, 20); - } -} diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/warp/WarpCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/warp/WarpCommand.java index 0234ea42..8dbcb6e5 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/warp/WarpCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/warp/WarpCommand.java @@ -56,11 +56,6 @@ public class WarpCommand extends SWCommand implements Disable, Enable { return SWCommandUtils.createMapper(Warp::getWarp, (commandSender, s) -> new ArrayList<>(Warp.getWarpNames())); } - @Register(value = "moon", noTabComplete = true) - public void tpMoon(Player p) { - Moon.startMoon(p); - } - @Register(value = "add", description = "WARP_HELP_ADD") @Register("create") public void addWarp(@Guard Player player, String name) {