From e133d98222d797916faf6767637493178a95adc4 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Fri, 14 Jun 2019 23:02:55 +0200 Subject: [PATCH] Removing replacing of Bedrock & TNT --- src/me/yaruma/fightsystem/FightSystem.java | 12 ------ .../yaruma/fightsystem/utils/WorldEdit.java | 39 ------------------- 2 files changed, 51 deletions(-) delete mode 100644 src/me/yaruma/fightsystem/utils/WorldEdit.java diff --git a/src/me/yaruma/fightsystem/FightSystem.java b/src/me/yaruma/fightsystem/FightSystem.java index 1ccd044..fc893b9 100644 --- a/src/me/yaruma/fightsystem/FightSystem.java +++ b/src/me/yaruma/fightsystem/FightSystem.java @@ -7,7 +7,6 @@ import me.yaruma.fightsystem.kit.KitManager; import me.yaruma.fightsystem.listener.*; import me.yaruma.fightsystem.utils.Config; import me.yaruma.fightsystem.utils.TechHider; -import me.yaruma.fightsystem.utils.WorldEdit; import me.yaruma.fightsystem.utils.countdown.Countdown; import me.yaruma.fightsystem.utils.countdown.FinishNoPlayersOnline; import me.yaruma.fightsystem.utils.countdown.FinishPreRunning; @@ -147,17 +146,6 @@ public class FightSystem extends JavaPlugin { teleportAllToFightSpawn(); setAllPlayersGM(GameMode.SURVIVAL); - WorldEdit.replace(Fight.getBlueTeam().getLeader().getPlayer(), - Config.TeamBlueCornerX, Config.TeamBlueCornerY, Config.TeamBlueCornerZ, - Config.TeamBlueCornerX + Config.SchemsizeX, - Config.TeamBlueCornerY + Config.SchemsizeY, - Config.TeamBlueCornerZ + Config.SchemsizeZ); - - WorldEdit.replace(Fight.getRedTeam().getLeader().getPlayer(), - Config.TeamRedCornerX, Config.TeamRedCornerY, Config.TeamRedCornerZ, - Config.TeamRedCornerX + Config.SchemsizeX, - Config.TeamRedCornerY + Config.SchemsizeY, - Config.TeamRedCornerZ + Config.SchemsizeZ); Bukkit.broadcastMessage(PREFIX + "§aDer Kampf beginnt!"); WinconditionTechKO.startAutoChecker(); } diff --git a/src/me/yaruma/fightsystem/utils/WorldEdit.java b/src/me/yaruma/fightsystem/utils/WorldEdit.java deleted file mode 100644 index de139de..0000000 --- a/src/me/yaruma/fightsystem/utils/WorldEdit.java +++ /dev/null @@ -1,39 +0,0 @@ -package me.yaruma.fightsystem.utils; - -import com.boydti.fawe.util.EditSessionBuilder; -import com.sk89q.worldedit.EditSession; -import com.sk89q.worldedit.blocks.BaseBlock; -import com.sk89q.worldedit.bukkit.BukkitWorld; -import com.sk89q.worldedit.bukkit.selections.CuboidSelection; -import com.sk89q.worldedit.world.World; -import org.bukkit.Location; -import org.bukkit.entity.Player; - -import java.util.HashSet; -import java.util.Set; - -public class WorldEdit { - - private WorldEdit(){} - - public static void replace(Player player, int minX, int minY, int minZ, int maxX, int maxY, int maxZ) { - World weWorld = new BukkitWorld(player.getWorld()); - EditSession editSession = new EditSessionBuilder(weWorld).fastmode(true).build(); - CuboidSelection cuboidSelection = new CuboidSelection(player.getWorld(), new Location(player.getWorld(), minX, minY, minZ), new Location(player.getWorld(), maxX, maxY, maxZ)); - - Set targetObsidian = new HashSet<>(); - targetObsidian.add(new BaseBlock(49)); - - Set targetBedrock = new HashSet<>(); - targetBedrock.add(new BaseBlock(7)); - - try { - editSession.replaceBlocks(cuboidSelection.getRegionSelector().getRegion(), targetObsidian, new BaseBlock(46)); - editSession.replaceBlocks(cuboidSelection.getRegionSelector().getRegion(), targetBedrock, new BaseBlock(165)); - - editSession.flushQueue(); - } catch (Exception ex){ - ex.printStackTrace(); - } - } -}