update
This commit is contained in:
@@ -2,7 +2,8 @@ package lnmpro.Commands;
|
|||||||
|
|
||||||
import lnmpro.Main;
|
import lnmpro.Main;
|
||||||
import lnmpro.Utils.Kits;
|
import lnmpro.Utils.Kits;
|
||||||
import lnmpro.Utils.SchematicPlacer;
|
import lnmpro.Utils.SchematicManager;
|
||||||
|
import net.kyori.adventure.text.format.NamedTextColor;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.GameMode;
|
import org.bukkit.GameMode;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
@@ -12,14 +13,19 @@ import org.bukkit.command.CommandExecutor;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.command.TabCompleter;
|
import org.bukkit.command.TabCompleter;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.metadata.FixedMetadataValue;
|
||||||
import org.bukkit.potion.PotionEffect;
|
import org.bukkit.potion.PotionEffect;
|
||||||
import org.bukkit.potion.PotionEffectType;
|
import org.bukkit.potion.PotionEffectType;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
import static java.util.Collections.emptyList;
|
||||||
|
import static java.util.Collections.min;
|
||||||
|
|
||||||
public class AcceptDuelCommand implements CommandExecutor, TabCompleter {
|
public class AcceptDuelCommand implements CommandExecutor, TabCompleter {
|
||||||
private final Main plugin;
|
private final Main plugin;
|
||||||
|
|
||||||
@@ -32,29 +38,80 @@ public class AcceptDuelCommand implements CommandExecutor, TabCompleter {
|
|||||||
if (sender instanceof Player player) {
|
if (sender instanceof Player player) {
|
||||||
if (player.hasMetadata("DueledBy")) {
|
if (player.hasMetadata("DueledBy")) {
|
||||||
Kits kitManager = new Kits(plugin);
|
Kits kitManager = new Kits(plugin);
|
||||||
SchematicPlacer schematic = new SchematicPlacer(plugin);
|
SchematicManager schematic = new SchematicManager(plugin);
|
||||||
|
|
||||||
UUID targetUUID = UUID.fromString(player.getMetadata("DueledBy").get(0).asString());
|
UUID targetUUID = UUID.fromString(player.getMetadata("DueledBy").get(0).asString());
|
||||||
Player enemy = Bukkit.getPlayer(targetUUID);
|
Player enemy = Bukkit.getPlayer(targetUUID);
|
||||||
String gamemode = player.getMetadata("DueledWithGamemode").get(0).asString();
|
String gamemode = player.getMetadata("DueledWithGamemode").get(0).asString();
|
||||||
enemy.sendMessage("cica " + gamemode);
|
|
||||||
player.sendMessage("cica " + gamemode);
|
|
||||||
player.removeMetadata("DueledBy", plugin);
|
player.removeMetadata("DueledBy", plugin);
|
||||||
player.removeMetadata("DueledWithGamemode", plugin);
|
|
||||||
|
|
||||||
player.getInventory().clear();
|
player.getInventory().clear();
|
||||||
enemy.getInventory().clear();
|
enemy.getInventory().clear();
|
||||||
player.getInventory().setContents(kitManager.getAxeKit(player).getContents());
|
|
||||||
enemy.getInventory().setContents(kitManager.getAxeKit(player).getContents());
|
|
||||||
|
|
||||||
|
int x = 0;
|
||||||
|
String arena = "";
|
||||||
|
|
||||||
|
if (gamemode.equals("uhc")) {
|
||||||
|
x = 1000;
|
||||||
|
arena = "football";
|
||||||
|
player.getInventory().setContents(kitManager.getUhcKit(player).getContents());
|
||||||
|
enemy.getInventory().setContents(kitManager.getUhcKit(player).getContents());
|
||||||
|
} else if (gamemode.equals("pot")) {
|
||||||
|
x = 0;
|
||||||
|
arena = "";
|
||||||
|
|
||||||
|
} else if (gamemode.equals("nethpot")) {
|
||||||
|
x = 0;
|
||||||
|
arena = "";
|
||||||
|
|
||||||
|
} else if (gamemode.equals("smp")) {
|
||||||
|
x = 0;
|
||||||
|
arena = "";
|
||||||
|
|
||||||
|
} else if (gamemode.equals("sword")) {
|
||||||
|
x = 1400;
|
||||||
|
arena = "football";
|
||||||
|
player.getInventory().setContents(kitManager.getSwordKit(player).getContents());
|
||||||
|
enemy.getInventory().setContents(kitManager.getSwordKit(player).getContents());
|
||||||
|
} else if (gamemode.equals("axe")) {
|
||||||
|
x = 1500;
|
||||||
|
arena = "football";
|
||||||
|
player.getInventory().setContents(kitManager.getAxeKit(player).getContents());
|
||||||
|
enemy.getInventory().setContents(kitManager.getAxeKit(player).getContents());
|
||||||
|
} else if (gamemode.equals("mace")) {
|
||||||
|
x = 0;
|
||||||
|
arena = "";
|
||||||
|
player.getInventory().setContents(kitManager.getMaceKit(player).getContents());
|
||||||
|
enemy.getInventory().setContents(kitManager.getMaceKit(player).getContents());
|
||||||
|
} else if (gamemode.equals("cart")) {
|
||||||
|
x = 0;
|
||||||
|
arena = "";
|
||||||
|
|
||||||
|
} else if (gamemode.equals("diasmp")) {
|
||||||
|
x = 1800;
|
||||||
|
arena = "football";
|
||||||
|
player.getInventory().setContents(kitManager.getDiaSMPKit(player).getContents());
|
||||||
|
enemy.getInventory().setContents(kitManager.getDiaSMPKit(player).getContents());
|
||||||
|
} else if (gamemode.equals("shieldlessuhc")) {
|
||||||
|
x = 0;
|
||||||
|
arena = "";
|
||||||
|
|
||||||
|
}
|
||||||
World world = Bukkit.getWorld("world");
|
World world = Bukkit.getWorld("world");
|
||||||
int x = 1000;
|
|
||||||
int y = 0;
|
int y = 0;
|
||||||
int z = -2000;
|
int z;
|
||||||
|
|
||||||
schematic.placeSchematic(world, x, y, z, "football");
|
if (plugin.usedArenas.isEmpty()) {
|
||||||
Location playerLoc = new Location(world, x + 19.5, y + 0.5, z + 0.5, 90, 0);
|
z = -2000;
|
||||||
Location enemyLoc = new Location(world, x - 17.5, y + 0.5, z + 0.5, -90, 0);
|
} else {
|
||||||
|
z = min(plugin.usedArenas) - 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
plugin.usedArenas.add(z);
|
||||||
|
|
||||||
|
schematic.placeSchematic(world, x, y, z, arena, true);
|
||||||
|
Location playerLoc = new Location(world, x + 19.5, y, z + 0.5, 90, 0);
|
||||||
|
Location enemyLoc = new Location(world, x - 17.5, y, z + 0.5, -90, 0);
|
||||||
|
|
||||||
for (PotionEffect potionEffect : player.getActivePotionEffects()) {
|
for (PotionEffect potionEffect : player.getActivePotionEffects()) {
|
||||||
player.removePotionEffect(potionEffect.getType());
|
player.removePotionEffect(potionEffect.getType());
|
||||||
@@ -75,6 +132,45 @@ public class AcceptDuelCommand implements CommandExecutor, TabCompleter {
|
|||||||
player.setGameMode(GameMode.ADVENTURE);
|
player.setGameMode(GameMode.ADVENTURE);
|
||||||
enemy.setGameMode(GameMode.ADVENTURE);
|
enemy.setGameMode(GameMode.ADVENTURE);
|
||||||
|
|
||||||
|
player.setMetadata("DuelingWith", new FixedMetadataValue(plugin, enemy.getUniqueId()));
|
||||||
|
enemy.setMetadata("DuelingWith", new FixedMetadataValue(plugin, player.getUniqueId()));
|
||||||
|
player.setMetadata("ArenaLoc", new FixedMetadataValue(plugin, new Location(world, x, y, z)));
|
||||||
|
enemy.setMetadata("ArenaLoc", new FixedMetadataValue(plugin, new Location(world, x, y, z)));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
player.setMetadata("Frozen", new FixedMetadataValue(plugin, true));
|
||||||
|
enemy.setMetadata("Frozen", new FixedMetadataValue(plugin, true));
|
||||||
|
|
||||||
|
new BukkitRunnable() {
|
||||||
|
int countdown = 3;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
if (countdown > 0) {
|
||||||
|
Component titleText = Component.text(String.valueOf(countdown), NamedTextColor.AQUA);
|
||||||
|
Title title = Title.title(
|
||||||
|
titleText,
|
||||||
|
Component.empty(),
|
||||||
|
Title.Times.times(Duration.ZERO, Duration.ofSeconds(1), Duration.ZERO)
|
||||||
|
);
|
||||||
|
player.showTitle(title);
|
||||||
|
enemy.showTitle(title);
|
||||||
|
countdown--;
|
||||||
|
} else {
|
||||||
|
Title startTitle = Title.title(
|
||||||
|
Component.text("§eA párbaj megkezdődött!"),
|
||||||
|
Component.empty(),
|
||||||
|
Title.Times.times(Duration.ZERO, Duration.ofSeconds(2), Duration.ofSeconds(1))
|
||||||
|
);
|
||||||
|
player.showTitle(startTitle);
|
||||||
|
enemy.showTitle(startTitle);
|
||||||
|
player.removeMetadata("Frozen", plugin);
|
||||||
|
enemy.removeMetadata("Frozen", plugin);
|
||||||
|
cancel();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}.runTaskTimer(plugin, 0L, 20L);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
sender.sendMessage("nem vagy player nem fog sikerulni");
|
sender.sendMessage("nem vagy player nem fog sikerulni");
|
||||||
@@ -82,6 +178,7 @@ public class AcceptDuelCommand implements CommandExecutor, TabCompleter {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public @Nullable List<String> onTabComplete(@NotNull CommandSender sender, @NotNull Command command, @NotNull String s, @NotNull String[] args) {
|
public @Nullable List<String> onTabComplete(@NotNull CommandSender sender, @NotNull Command command, @NotNull String s, @NotNull String[] args) {
|
||||||
return List.of();
|
return List.of();
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ public class DuelCommand implements CommandExecutor, TabCompleter {
|
|||||||
if (args.length != 1) {
|
if (args.length != 1) {
|
||||||
player.sendMessage("§a Használat");
|
player.sendMessage("§a Használat");
|
||||||
player.sendMessage("§a----------------------------------------");
|
player.sendMessage("§a----------------------------------------");
|
||||||
player.sendMessage("§a/duel [játékos] » Meghívás egy párbajra"); //valew ez rohadtul ainak hangzik ird mar at
|
player.sendMessage("§a/duel [játékos] » Meghívás egy párbajra");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -49,7 +49,7 @@ public class DuelCommand implements CommandExecutor, TabCompleter {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (target.hasMetadata("DueledBy") && target.getMetadata("DueledBy").get(0).asString().equals(player.getUniqueId().toString())) {
|
if (target.hasMetadata("DueledBy") && target.getMetadata("DueledBy").get(0).asString().equals(player.getUniqueId().toString())) {
|
||||||
player.sendMessage("§7[§9§lInsane§e§lDuels§7] §7» §e" + target.getName() + "§9-nek már küldtél párbaj kérelmet.");
|
player.sendMessage("§7[§9§lInsane§e§lDuels§7] §7» §e" + target.getName() + "§9 játékosnak már küldtél párbaj kérelmet.");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
94
src/main/java/lnmpro/Listeners/DuelEndListener.java
Normal file
94
src/main/java/lnmpro/Listeners/DuelEndListener.java
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
package lnmpro.Listeners;
|
||||||
|
|
||||||
|
import lnmpro.Main;
|
||||||
|
import lnmpro.Utils.SchematicManager;
|
||||||
|
import org.bukkit.*;
|
||||||
|
import org.bukkit.entity.Firework;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.event.EventHandler;
|
||||||
|
import org.bukkit.event.Listener;
|
||||||
|
import org.bukkit.event.entity.PlayerDeathEvent;
|
||||||
|
|
||||||
|
import java.time.Duration;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.UUID;
|
||||||
|
import net.kyori.adventure.text.Component;
|
||||||
|
import net.kyori.adventure.title.Title;
|
||||||
|
import org.bukkit.inventory.meta.FireworkMeta;
|
||||||
|
|
||||||
|
public class DuelEndListener implements Listener {
|
||||||
|
private final Main plugin;
|
||||||
|
|
||||||
|
public DuelEndListener(Main plugin) {
|
||||||
|
this.plugin = plugin;
|
||||||
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void onDuelEnd(PlayerDeathEvent e) {
|
||||||
|
Player player = e.getPlayer();
|
||||||
|
if (player.hasMetadata("DuelingWith")) {
|
||||||
|
SchematicManager schematic = new SchematicManager(plugin);
|
||||||
|
UUID targetUUID = UUID.fromString(player.getMetadata("DuelingWith").get(0).asString());
|
||||||
|
Player enemy = Bukkit.getPlayer(targetUUID);
|
||||||
|
player.getInventory().clear();
|
||||||
|
enemy.getInventory().clear();
|
||||||
|
e.setCancelled(true);
|
||||||
|
player.setGameMode(GameMode.SPECTATOR);
|
||||||
|
Location playerLoc = player.getLocation();
|
||||||
|
|
||||||
|
Title winnerTitle = Title.title(
|
||||||
|
Component.text("§6🗡 §eMegnyerted a párbajt!"),
|
||||||
|
Component.empty(),
|
||||||
|
Title.Times.times(Duration.ofMillis(500), Duration.ofSeconds(3), Duration.ofMillis(1000))
|
||||||
|
);
|
||||||
|
|
||||||
|
Title loserTitle = Title.title(
|
||||||
|
Component.text("§4🗡 §cElvesztetted a párbajt!"),
|
||||||
|
Component.empty(),
|
||||||
|
Title.Times.times(Duration.ofMillis(500), Duration.ofSeconds(3), Duration.ofMillis(1000))
|
||||||
|
);
|
||||||
|
|
||||||
|
for (int i = 0; i < 3; i++) {
|
||||||
|
int delay = i * 10;
|
||||||
|
Bukkit.getScheduler().runTaskLater(plugin, () -> {
|
||||||
|
Firework firework = playerLoc.getWorld().spawn(playerLoc, Firework.class);
|
||||||
|
FireworkMeta meta = firework.getFireworkMeta();
|
||||||
|
|
||||||
|
FireworkEffect effect = FireworkEffect.builder()
|
||||||
|
.with(FireworkEffect.Type.BURST)
|
||||||
|
.withColor(
|
||||||
|
Color.fromRGB(2437522),
|
||||||
|
Color.fromRGB(14602026),
|
||||||
|
Color.fromRGB(6719955)
|
||||||
|
)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
meta.addEffect(effect);
|
||||||
|
meta.setPower(1);
|
||||||
|
firework.setFireworkMeta(meta);
|
||||||
|
}, delay);
|
||||||
|
}
|
||||||
|
|
||||||
|
player.showTitle(loserTitle);
|
||||||
|
enemy.showTitle(winnerTitle);
|
||||||
|
|
||||||
|
Bukkit.getScheduler().runTaskLater(plugin, () -> {
|
||||||
|
try {
|
||||||
|
Location arenaLoc = (Location) player.getMetadata("ArenaLoc").get(0).value();
|
||||||
|
Location loc1 = new Location(arenaLoc.getWorld(), arenaLoc.getX() - 36, arenaLoc.getY() - 4, arenaLoc.getZ() - 30);
|
||||||
|
Location loc2 = new Location(arenaLoc.getWorld(), arenaLoc.getX() + 36, arenaLoc.getY() + 11, arenaLoc.getZ() + 30);
|
||||||
|
schematic.removeSchematic(arenaLoc.getWorld(), loc1, loc2);
|
||||||
|
|
||||||
|
Location spawn = new Location(Bukkit.getWorld("world"), 0, 3, 0, 0, 0);
|
||||||
|
player.setGameMode(GameMode.ADVENTURE);
|
||||||
|
enemy.setGameMode(GameMode.ADVENTURE);
|
||||||
|
player.teleport(spawn);
|
||||||
|
enemy.teleport(spawn);
|
||||||
|
} catch (Exception exception) {
|
||||||
|
exception.printStackTrace();
|
||||||
|
}
|
||||||
|
}, 60L);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,6 +4,9 @@ import org.bukkit.plugin.java.JavaPlugin;
|
|||||||
import lnmpro.Commands.*;
|
import lnmpro.Commands.*;
|
||||||
import lnmpro.Listeners.*;
|
import lnmpro.Listeners.*;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public final class Main extends JavaPlugin {
|
public final class Main extends JavaPlugin {
|
||||||
|
|
||||||
private static Main instance;
|
private static Main instance;
|
||||||
@@ -20,6 +23,8 @@ public final class Main extends JavaPlugin {
|
|||||||
|
|
||||||
getServer().getPluginManager().registerEvents(new DuelRequestListener(this), this);
|
getServer().getPluginManager().registerEvents(new DuelRequestListener(this), this);
|
||||||
getServer().getPluginManager().registerEvents(new KitListener(this), this);
|
getServer().getPluginManager().registerEvents(new KitListener(this), this);
|
||||||
|
getServer().getPluginManager().registerEvents(new DuelEndListener(this), this);
|
||||||
|
getServer().getPluginManager().registerEvents(new FreezeListener(), this);
|
||||||
|
|
||||||
instance = this;
|
instance = this;
|
||||||
}
|
}
|
||||||
@@ -27,4 +32,6 @@ public final class Main extends JavaPlugin {
|
|||||||
public static Main getInstance() {
|
public static Main getInstance() {
|
||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<Integer> usedArenas = new ArrayList<>();
|
||||||
}
|
}
|
||||||
@@ -9,8 +9,11 @@ import com.sk89q.worldedit.extent.clipboard.io.ClipboardFormats;
|
|||||||
import com.sk89q.worldedit.extent.clipboard.io.ClipboardReader;
|
import com.sk89q.worldedit.extent.clipboard.io.ClipboardReader;
|
||||||
import com.sk89q.worldedit.function.operation.Operation;
|
import com.sk89q.worldedit.function.operation.Operation;
|
||||||
import com.sk89q.worldedit.function.operation.Operations;
|
import com.sk89q.worldedit.function.operation.Operations;
|
||||||
|
import com.sk89q.worldedit.history.change.BlockChange;
|
||||||
import com.sk89q.worldedit.math.BlockVector3;
|
import com.sk89q.worldedit.math.BlockVector3;
|
||||||
|
import com.sk89q.worldedit.regions.CuboidRegion;
|
||||||
import com.sk89q.worldedit.session.ClipboardHolder;
|
import com.sk89q.worldedit.session.ClipboardHolder;
|
||||||
|
import com.sk89q.worldedit.world.block.BlockTypes;
|
||||||
import lnmpro.Main;
|
import lnmpro.Main;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
@@ -19,13 +22,14 @@ import java.io.File;
|
|||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
public class SchematicPlacer {
|
public class SchematicManager {
|
||||||
private final Main plugin;
|
private final Main plugin;
|
||||||
|
|
||||||
public SchematicPlacer(Main plugin) {
|
public SchematicManager(Main plugin) {
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
}
|
}
|
||||||
public boolean placeSchematic(World world, int x, int y, int z, String schematicName) {
|
|
||||||
|
public boolean placeSchematic(World world, int x, int y, int z, String schematicName, boolean air) {
|
||||||
File schematicFile = new File(plugin.getDataFolder() + File.separator + "schematics", schematicName + ".schem");
|
File schematicFile = new File(plugin.getDataFolder() + File.separator + "schematics", schematicName + ".schem");
|
||||||
|
|
||||||
if (!schematicFile.exists()) {
|
if (!schematicFile.exists()) {
|
||||||
@@ -49,7 +53,7 @@ public class SchematicPlacer {
|
|||||||
Operation operation = new ClipboardHolder(clipboard)
|
Operation operation = new ClipboardHolder(clipboard)
|
||||||
.createPaste(editSession)
|
.createPaste(editSession)
|
||||||
.to(BlockVector3.at(x, y, z))
|
.to(BlockVector3.at(x, y, z))
|
||||||
.ignoreAirBlocks(false)
|
.ignoreAirBlocks(air)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
Operations.complete(operation);
|
Operations.complete(operation);
|
||||||
@@ -67,13 +71,30 @@ public class SchematicPlacer {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean placeSchematic(Location location, String schematicName) {
|
public boolean removeSchematic(World world, Location loc1, Location loc2) {
|
||||||
return placeSchematic(
|
try {
|
||||||
location.getWorld(),
|
com.sk89q.worldedit.world.World weWorld = BukkitAdapter.adapt(world);
|
||||||
location.getBlockX(),
|
|
||||||
location.getBlockY(),
|
int minX = Math.min(loc1.getBlockX(), loc2.getBlockX());
|
||||||
location.getBlockZ(),
|
int maxX = Math.max(loc1.getBlockX(), loc2.getBlockX());
|
||||||
schematicName
|
int minY = Math.min(loc1.getBlockY(), loc2.getBlockY());
|
||||||
);
|
int maxY = Math.max(loc1.getBlockY(), loc2.getBlockY());
|
||||||
|
int minZ = Math.min(loc1.getBlockZ(), loc2.getBlockZ());
|
||||||
|
int maxZ = Math.max(loc1.getBlockZ(), loc2.getBlockZ());
|
||||||
|
|
||||||
|
BlockVector3 min = BlockVector3.at(minX, minY, minZ);
|
||||||
|
BlockVector3 max = BlockVector3.at(maxX, maxY, maxZ);
|
||||||
|
CuboidRegion region = new CuboidRegion(weWorld, min, max);
|
||||||
|
|
||||||
|
try (EditSession editSession = WorldEdit.getInstance().newEditSession(weWorld)) {
|
||||||
|
editSession.setBlocks(region, BlockTypes.AIR.getDefaultState());
|
||||||
|
editSession.flushSession();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
plugin.getLogger().severe("Error removing schematic: " + e.getMessage());
|
||||||
|
e.printStackTrace();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,2 +1,5 @@
|
|||||||
lnmpro/Utils/SchematicPlacer.class
|
lnmpro/Listeners/FreezeListener.class
|
||||||
|
lnmpro/Commands/AcceptDuelCommand$1.class
|
||||||
lnmpro/Commands/DuelCommand.class
|
lnmpro/Commands/DuelCommand.class
|
||||||
|
lnmpro/Listeners/DuelEndListener.class
|
||||||
|
lnmpro/Utils/SchematicManager.class
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
/home/jgj52/IdeaProjects/InsaneDuels/src/main/java/lnmpro/Commands/AcceptDuelCommand.java
|
/home/jgj52/IdeaProjects/InsaneDuels/src/main/java/lnmpro/Commands/AcceptDuelCommand.java
|
||||||
/home/jgj52/IdeaProjects/InsaneDuels/src/main/java/lnmpro/Commands/DenyDuelCommand.java
|
/home/jgj52/IdeaProjects/InsaneDuels/src/main/java/lnmpro/Commands/DenyDuelCommand.java
|
||||||
/home/jgj52/IdeaProjects/InsaneDuels/src/main/java/lnmpro/Commands/DuelCommand.java
|
/home/jgj52/IdeaProjects/InsaneDuels/src/main/java/lnmpro/Commands/DuelCommand.java
|
||||||
|
/home/jgj52/IdeaProjects/InsaneDuels/src/main/java/lnmpro/Listeners/DuelEndListener.java
|
||||||
/home/jgj52/IdeaProjects/InsaneDuels/src/main/java/lnmpro/Listeners/DuelRequestListener.java
|
/home/jgj52/IdeaProjects/InsaneDuels/src/main/java/lnmpro/Listeners/DuelRequestListener.java
|
||||||
|
/home/jgj52/IdeaProjects/InsaneDuels/src/main/java/lnmpro/Listeners/FreezeListener.java
|
||||||
/home/jgj52/IdeaProjects/InsaneDuels/src/main/java/lnmpro/Listeners/KitListener.java
|
/home/jgj52/IdeaProjects/InsaneDuels/src/main/java/lnmpro/Listeners/KitListener.java
|
||||||
/home/jgj52/IdeaProjects/InsaneDuels/src/main/java/lnmpro/Main.java
|
/home/jgj52/IdeaProjects/InsaneDuels/src/main/java/lnmpro/Main.java
|
||||||
/home/jgj52/IdeaProjects/InsaneDuels/src/main/java/lnmpro/Utils/Kits.java
|
/home/jgj52/IdeaProjects/InsaneDuels/src/main/java/lnmpro/Utils/Kits.java
|
||||||
/home/jgj52/IdeaProjects/InsaneDuels/src/main/java/lnmpro/Utils/SchematicPlacer.java
|
/home/jgj52/IdeaProjects/InsaneDuels/src/main/java/lnmpro/Utils/SchematicManager.java
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user