SteamWar/FightSystem
Archiviert
13
1

Removing replacing of Bedrock & TNT

Dieser Commit ist enthalten in:
Travis CI 2019-06-14 23:02:55 +02:00
Ursprung 52c4976f09
Commit e133d98222
2 geänderte Dateien mit 0 neuen und 51 gelöschten Zeilen

Datei anzeigen

@ -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();
}

Datei anzeigen

@ -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<BaseBlock> targetObsidian = new HashSet<>();
targetObsidian.add(new BaseBlock(49));
Set<BaseBlock> 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();
}
}
}