diff --git a/FightSystem_14/src/de/steamwar/fightsystem/utils/FlatteningWrapper14.java b/FightSystem_14/src/de/steamwar/fightsystem/utils/FlatteningWrapper14.java index 7f79995..3cd74c0 100644 --- a/FightSystem_14/src/de/steamwar/fightsystem/utils/FlatteningWrapper14.java +++ b/FightSystem_14/src/de/steamwar/fightsystem/utils/FlatteningWrapper14.java @@ -84,17 +84,20 @@ public class FlatteningWrapper14 implements FlatteningWrapper.IFlatteningWrapper } @Override - public Material onBreak(Material type) { + public ItemStack onBreak(Block block) { + Material type = block.getType(); switch(type){ case REDSTONE_WIRE: - return Material.REDSTONE; + type = Material.REDSTONE; + break; case PISTON_HEAD: - return Material.PISTON; + type = Material.PISTON; + break; case ICE: - return Material.AIR; - default: - return type; + type = Material.AIR; + break; } + return new ItemStack(type); } @Override diff --git a/FightSystem_8/src/de/steamwar/fightsystem/utils/FlatteningWrapper8.java b/FightSystem_8/src/de/steamwar/fightsystem/utils/FlatteningWrapper8.java index b4a9fd3..e672541 100644 --- a/FightSystem_8/src/de/steamwar/fightsystem/utils/FlatteningWrapper8.java +++ b/FightSystem_8/src/de/steamwar/fightsystem/utils/FlatteningWrapper8.java @@ -63,17 +63,8 @@ public class FlatteningWrapper8 implements FlatteningWrapper.IFlatteningWrapper } @Override - public Material onBreak(Material type) { - switch(type){ - case REDSTONE_WIRE: - return Material.REDSTONE; - case PISTON_EXTENSION: - return Material.PISTON_BASE; - case ICE: - return Material.AIR; - default: - return type; - } + public ItemStack onBreak(Block block) { + return block.getDrops().stream().findAny().orElse(new ItemStack(Material.AIR)); } @Override diff --git a/FightSystem_Core/src/de/steamwar/fightsystem/FightSystem.java b/FightSystem_Core/src/de/steamwar/fightsystem/FightSystem.java index 96a5d88..ba1a906 100644 --- a/FightSystem_Core/src/de/steamwar/fightsystem/FightSystem.java +++ b/FightSystem_Core/src/de/steamwar/fightsystem/FightSystem.java @@ -49,6 +49,7 @@ public class FightSystem extends JavaPlugin { private static Player eventLeiter; private Message message; + private FightTeam lastWinner; @Override public void onLoad() { @@ -71,6 +72,7 @@ public class FightSystem extends JavaPlugin { new InFightDamage(); new InFightInventory(); new DenyWorldInteraction(); + new DenyInventoryMovement(); new EventJoin(); new Recording(); //new ResourcePack(); @@ -81,6 +83,7 @@ public class FightSystem extends JavaPlugin { new TestJoin(); new NormalJoin(); new RankedJoin(); + new RunningWorldInteraction(); new PersonalKitCreator(); new ArrowStopper(); new ArrowPickup(); @@ -186,6 +189,7 @@ public class FightSystem extends JavaPlugin { } public static void setSpectateState(FightTeam winFightTeam, String winreason, String subtitle, Object... params) { + plugin.lastWinner = winFightTeam; FightUI.printWin(winFightTeam, subtitle, params); FightState.setFightState(FightState.SPECTATE); @@ -233,6 +237,10 @@ public class FightSystem extends JavaPlugin { return plugin.message; } + public static FightTeam getLastWinner() { + return plugin.lastWinner; + } + public static void shutdown() { //Staggered kick to prevent lobby overloading if(Bukkit.getOnlinePlayers().isEmpty()){ diff --git a/FightSystem_Core/src/de/steamwar/fightsystem/FightSystem.properties b/FightSystem_Core/src/de/steamwar/fightsystem/FightSystem.properties index 2d16f10..0c10467 100644 --- a/FightSystem_Core/src/de/steamwar/fightsystem/FightSystem.properties +++ b/FightSystem_Core/src/de/steamwar/fightsystem/FightSystem.properties @@ -193,6 +193,8 @@ BAR_RUNNING1={1} {3} {5} {0} {6} {4} {2} BAR_RUNNING2={1} {3} {5} {7} {0} {6} {8} {4} {2} BAR_RUNNING3={1} {3} {5} {7} {9} {0} {6} {8} {10} {4} {2} BAR_SPECTATE={1} §7Kampf vorbei {0} {2} +BAR_TIE={1} §7Unentschieden {0} {2} +BAR_WIN={1} §7Sieg {3} {0} {2} BAR_POINTS={0} §8Punkte BAR_PERCENT={0}§8% BAR_CANNONS={0} §8Kanonen diff --git a/FightSystem_Core/src/de/steamwar/fightsystem/fight/FightPlayer.java b/FightSystem_Core/src/de/steamwar/fightsystem/fight/FightPlayer.java index f86bb61..5f3651a 100644 --- a/FightSystem_Core/src/de/steamwar/fightsystem/fight/FightPlayer.java +++ b/FightSystem_Core/src/de/steamwar/fightsystem/fight/FightPlayer.java @@ -61,6 +61,7 @@ public class FightPlayer { if(enternCountdown != null){ enternCountdown.disable(); } + enternCountdown = null; } public Player getPlayer() { diff --git a/FightSystem_Core/src/de/steamwar/fightsystem/fight/FightTeam.java b/FightSystem_Core/src/de/steamwar/fightsystem/fight/FightTeam.java index 8b85300..2732319 100644 --- a/FightSystem_Core/src/de/steamwar/fightsystem/fight/FightTeam.java +++ b/FightSystem_Core/src/de/steamwar/fightsystem/fight/FightTeam.java @@ -66,6 +66,7 @@ public class FightTeam { private final Region schemRegion; private final Region extendRegion; + @SuppressWarnings("deprecation") public FightTeam(String name, String prefix, Location spawn, Region schemRegion, Region extendRegion, boolean rotate, boolean blue, UUID designatedLeader) { this.spawn = spawn; this.schemRegion = schemRegion; @@ -87,7 +88,6 @@ public class FightTeam { assert team != null; WorldOfColorWrapper.impl.setTeamColor(team, color); BountifulWrapper.impl.setNametagVisibility(team); - //noinspection deprecation team.setNameTagVisibility(NameTagVisibility.HIDE_FOR_OTHER_TEAMS); team.setAllowFriendlyFire(false); } @@ -167,10 +167,10 @@ public class FightTeam { if(leaderBackup != null){ playerSet.remove(leaderBackup.getPlayer()); - addMember(leaderBackup.getPlayer()); + addMember(leaderBackup.getPlayer(), true); } - playerSet.forEach(this::addMember); + playerSet.forEach(p -> addMember(p, true)); if(ArenaMode.VariableTeams.contains(Config.mode) && isLeaderless()){ for(Player player : Bukkit.getOnlinePlayers()){ @@ -195,6 +195,10 @@ public class FightTeam { } public void addMember(Player player) { + addMember(player, false); + } + + public void addMember(Player player, boolean silent) { final List chunksToReload = TechHider.prepareChunkReload(player, false); FightPlayer fightPlayer = new FightPlayer(player, this); players.put(player, fightPlayer); @@ -214,8 +218,8 @@ public class FightTeam { TechHider.reloadChunks(player, chunksToReload, false); if(isLeaderless()) - setLeader(fightPlayer); - else + setLeader(fightPlayer, silent); + else if(!silent) FightUI.addSubtitle("UI_PLAYER_JOINS", prefix, player.getName()); } @@ -257,13 +261,13 @@ public class FightTeam { private void removeLeader() { this.leader = null; if(!players.isEmpty()) { - setLeader(players.values().iterator().next()); + setLeader(players.values().iterator().next(), false); }else if(FightState.getFightState() != FightState.PRE_LEADER_SETUP && !ArenaMode.RankedEvent.contains(Config.mode)){ Bukkit.getScheduler().runTaskLater(FightSystem.getPlugin(), FightSystem::setPreLeaderState, 1); } } - private void setLeader(FightPlayer leader) { + private void setLeader(FightPlayer leader, boolean silent) { PersonalKitCreator.closeIfInKitCreator(leader.getPlayer()); this.leader = leader; @@ -271,7 +275,8 @@ public class FightTeam { if(ready) setReady(false); - FightUI.addSubtitle("UI_LEADER_JOINS", prefix, leader.getPlayer().getName()); + if(!silent) + FightUI.addSubtitle("UI_LEADER_JOINS", prefix, leader.getPlayer().getName()); Optional maxRank = Schematic.getSchemsOfType(leader.getPlayer().getUniqueId(), Config.SchematicType).stream().map(Schematic::getRank).max(Integer::compare); if(Config.RanksEnabled) diff --git a/FightSystem_Core/src/de/steamwar/fightsystem/listener/DenyInventoryMovement.java b/FightSystem_Core/src/de/steamwar/fightsystem/listener/DenyInventoryMovement.java new file mode 100644 index 0000000..bb3454c --- /dev/null +++ b/FightSystem_Core/src/de/steamwar/fightsystem/listener/DenyInventoryMovement.java @@ -0,0 +1,51 @@ +/* + 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.fightsystem.listener; + +import de.steamwar.fightsystem.ArenaMode; +import de.steamwar.fightsystem.states.FightState; +import de.steamwar.fightsystem.states.StateDependentListener; +import de.steamwar.fightsystem.utils.BountifulWrapper; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.event.inventory.InventoryClickEvent; +import org.bukkit.event.inventory.InventoryDragEvent; + +public class DenyInventoryMovement implements Listener { + + public DenyInventoryMovement() { + new StateDependentListener(ArenaMode.AntiTest, FightState.AntiIngame, this); + + Listener listener = BountifulWrapper.impl.newDenyHandSwapListener(); + new StateDependentListener(ArenaMode.AntiTest, FightState.AntiIngame, listener); + } + + @EventHandler + public void onInventoryClick(InventoryClickEvent event) { + if(!PersonalKitCreator.inKitCreator(event.getWhoClicked())) + event.setCancelled(true); + } + + @EventHandler + public void onInventoryDrag(InventoryDragEvent event) { + if(!PersonalKitCreator.inKitCreator(event.getWhoClicked())) + event.setCancelled(true); + } +} diff --git a/FightSystem_Core/src/de/steamwar/fightsystem/listener/DenyWorldInteraction.java b/FightSystem_Core/src/de/steamwar/fightsystem/listener/DenyWorldInteraction.java index f706462..efc6cd8 100644 --- a/FightSystem_Core/src/de/steamwar/fightsystem/listener/DenyWorldInteraction.java +++ b/FightSystem_Core/src/de/steamwar/fightsystem/listener/DenyWorldInteraction.java @@ -23,7 +23,6 @@ import de.steamwar.fightsystem.ArenaMode; import de.steamwar.fightsystem.FightSystem; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentListener; -import de.steamwar.fightsystem.utils.BountifulWrapper; import net.md_5.bungee.api.ChatMessageType; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; @@ -32,8 +31,6 @@ import org.bukkit.event.block.BlockBreakEvent; import org.bukkit.event.block.BlockPlaceEvent; import org.bukkit.event.entity.EntityExplodeEvent; import org.bukkit.event.entity.ProjectileLaunchEvent; -import org.bukkit.event.inventory.InventoryClickEvent; -import org.bukkit.event.inventory.InventoryDragEvent; import org.bukkit.event.player.PlayerKickEvent; public class DenyWorldInteraction implements Listener { @@ -41,10 +38,6 @@ public class DenyWorldInteraction implements Listener { public DenyWorldInteraction() { new StateDependentListener(ArenaMode.Test, FightState.PreRunning, this); new StateDependentListener(ArenaMode.AntiTest, FightState.AntiRunning, this); - - Listener listener = BountifulWrapper.impl.newDenyHandSwapListener(); - new StateDependentListener(ArenaMode.Test, FightState.PreRunning, listener); - new StateDependentListener(ArenaMode.AntiTest, FightState.AntiRunning, listener); } @EventHandler @@ -72,18 +65,6 @@ public class DenyWorldInteraction implements Listener { e.setCancelled(true); } - @EventHandler - public void onInventoryClick(InventoryClickEvent event) { - if(!PersonalKitCreator.inKitCreator(event.getWhoClicked())) - event.setCancelled(true); - } - - @EventHandler - public void onInventoryDrag(InventoryDragEvent event) { - if(!PersonalKitCreator.inKitCreator(event.getWhoClicked())) - event.setCancelled(true); - } - @EventHandler public void handleProjectileLaunch(ProjectileLaunchEvent event) { event.setCancelled(true); diff --git a/FightSystem_Core/src/de/steamwar/fightsystem/listener/InFightInventory.java b/FightSystem_Core/src/de/steamwar/fightsystem/listener/InFightInventory.java index 72d2857..894a497 100644 --- a/FightSystem_Core/src/de/steamwar/fightsystem/listener/InFightInventory.java +++ b/FightSystem_Core/src/de/steamwar/fightsystem/listener/InFightInventory.java @@ -20,19 +20,12 @@ package de.steamwar.fightsystem.listener; import de.steamwar.fightsystem.ArenaMode; -import de.steamwar.fightsystem.FightSystem; -import de.steamwar.fightsystem.fight.Fight; -import de.steamwar.fightsystem.fight.FightPlayer; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentListener; -import de.steamwar.fightsystem.utils.FlatteningWrapper; -import net.md_5.bungee.api.ChatMessageType; import org.bukkit.Material; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; -import org.bukkit.event.block.BlockBreakEvent; import org.bukkit.event.block.BlockDispenseEvent; -import org.bukkit.event.block.BlockPlaceEvent; import org.bukkit.event.inventory.InventoryClickEvent; import org.bukkit.event.inventory.InventoryDragEvent; import org.bukkit.event.inventory.InventoryType; @@ -42,7 +35,7 @@ import org.bukkit.inventory.ItemStack; public class InFightInventory implements Listener { public InFightInventory() { - new StateDependentListener(ArenaMode.AntiReplay, FightState.Running, this); + new StateDependentListener(ArenaMode.AntiReplay, FightState.Ingame, this); } @EventHandler @@ -79,44 +72,6 @@ public class InFightInventory implements Listener { } } - @EventHandler - public void onBlockBreak(BlockBreakEvent event) { - Inventory inventory = event.getPlayer().getInventory(); - - Material type = FlatteningWrapper.impl.onBreak(event.getBlock().getType()); - ItemStack itemStack; - - for (int i = 0; i <= 35; i++) { //35 is the last normal inventory slot - itemStack = inventory.getItem(i); - if (itemStack != null && itemStack.getType().equals(type) && itemStack.getAmount() != itemStack.getMaxStackSize()) { - itemStack.setType(type); - itemStack.setAmount(itemStack.getAmount() + 1); - inventory.setItem(i, itemStack); - event.getPlayer().updateInventory(); - return; - } - } - - for (int i = 0; i <= 35; i++) { //35 is the last normal inventory slot - itemStack = inventory.getItem(i); - if (itemStack == null || itemStack.getType().equals(Material.AIR)) { - itemStack = new ItemStack(type, 1); - inventory.setItem(i, itemStack); - event.getPlayer().updateInventory(); - return; - } - } - } - - @EventHandler - public void onBlockPlace(BlockPlaceEvent e) { - FightPlayer fp = Fight.getFightPlayer(e.getPlayer()); - if(fp != null && !fp.getKit().isTnt() && e.getBlockPlaced().getType() == Material.TNT){ - FightSystem.getMessage().sendPrefixless("NO_TNT_PLACE", e.getPlayer(), ChatMessageType.ACTION_BAR); - e.setCancelled(true); - } - } - @EventHandler public void onBlockDispense(BlockDispenseEvent e) { if(e.getItem().getType() == Material.TNT) diff --git a/FightSystem_Core/src/de/steamwar/fightsystem/listener/RunningWorldInteraction.java b/FightSystem_Core/src/de/steamwar/fightsystem/listener/RunningWorldInteraction.java new file mode 100644 index 0000000..828fb31 --- /dev/null +++ b/FightSystem_Core/src/de/steamwar/fightsystem/listener/RunningWorldInteraction.java @@ -0,0 +1,78 @@ +/* + 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.fightsystem.listener; + +import de.steamwar.fightsystem.ArenaMode; +import de.steamwar.fightsystem.FightSystem; +import de.steamwar.fightsystem.fight.Fight; +import de.steamwar.fightsystem.fight.FightPlayer; +import de.steamwar.fightsystem.states.FightState; +import de.steamwar.fightsystem.states.StateDependentListener; +import de.steamwar.fightsystem.utils.FlatteningWrapper; +import net.md_5.bungee.api.ChatMessageType; +import org.bukkit.Material; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.event.block.BlockBreakEvent; +import org.bukkit.event.block.BlockPlaceEvent; +import org.bukkit.inventory.Inventory; +import org.bukkit.inventory.ItemStack; + +public class RunningWorldInteraction implements Listener { + + public RunningWorldInteraction() { + new StateDependentListener(ArenaMode.AntiReplay, FightState.Running, this); + } + + @EventHandler + public void onBlockBreak(BlockBreakEvent event) { + Inventory inventory = event.getPlayer().getInventory(); + + ItemStack stack = FlatteningWrapper.impl.onBreak(event.getBlock()); + + for (int i = 0; i <= 35; i++) { //35 is the last normal inventory slot + ItemStack itemStack = inventory.getItem(i); + if (itemStack != null && itemStack.isSimilar(stack) && itemStack.getAmount() != itemStack.getMaxStackSize()) { + itemStack.setAmount(itemStack.getAmount() + 1); + inventory.setItem(i, itemStack); + event.getPlayer().updateInventory(); + return; + } + } + + for (int i = 0; i <= 35; i++) { //35 is the last normal inventory slot + ItemStack itemStack = inventory.getItem(i); + if (itemStack == null || itemStack.getType().equals(Material.AIR)) { + inventory.setItem(i, stack); + event.getPlayer().updateInventory(); + return; + } + } + } + + @EventHandler + public void onBlockPlace(BlockPlaceEvent e) { + FightPlayer fp = Fight.getFightPlayer(e.getPlayer()); + if(fp != null && !fp.getKit().isTnt() && e.getBlockPlaced().getType() == Material.TNT){ + FightSystem.getMessage().sendPrefixless("NO_TNT_PLACE", e.getPlayer(), ChatMessageType.ACTION_BAR); + e.setCancelled(true); + } + } +} diff --git a/FightSystem_Core/src/de/steamwar/fightsystem/record/FileSource.java b/FightSystem_Core/src/de/steamwar/fightsystem/record/FileSource.java index 86c52ad..fc3c981 100644 --- a/FightSystem_Core/src/de/steamwar/fightsystem/record/FileSource.java +++ b/FightSystem_Core/src/de/steamwar/fightsystem/record/FileSource.java @@ -38,13 +38,18 @@ public class FileSource extends PacketSource { return; } - InputStream input = de.steamwar.sql.Fight.getReplay(Config.ReplayID); + de.steamwar.sql.Fight.getReplay(Config.ReplayID, input -> { + try { + Files.copy( + input, + FileRecorder.getFile().toPath(), + StandardCopyOption.REPLACE_EXISTING); + } catch (IOException e) { + throw new SecurityException("Could not start replay", e); + } + }); + try { - Files.copy( - input, - FileRecorder.getFile().toPath(), - StandardCopyOption.REPLACE_EXISTING); - input.close(); new FileSource(FileRecorder.getFile()); } catch (IOException e) { throw new SecurityException("Could not start replay", e); diff --git a/FightSystem_Core/src/de/steamwar/fightsystem/states/FightState.java b/FightSystem_Core/src/de/steamwar/fightsystem/states/FightState.java index 84deb25..1a75d1a 100644 --- a/FightSystem_Core/src/de/steamwar/fightsystem/states/FightState.java +++ b/FightSystem_Core/src/de/steamwar/fightsystem/states/FightState.java @@ -44,6 +44,7 @@ public enum FightState { public static final Set Schem = Collections.unmodifiableSet(EnumSet.complementOf(EnumSet.of(PRE_LEADER_SETUP, PRE_SCHEM_SETUP))); public static final Set Recording = Collections.unmodifiableSet(EnumSet.complementOf(EnumSet.of(PRE_LEADER_SETUP, PRE_SCHEM_SETUP, SPECTATE))); public static final Set AntiRunning = Collections.unmodifiableSet(EnumSet.complementOf(EnumSet.of(RUNNING))); + public static final Set AntiIngame = Collections.unmodifiableSet(EnumSet.complementOf(EnumSet.of(PRE_RUNNING, RUNNING))); public static final Set AntiSpectate = Collections.unmodifiableSet(EnumSet.complementOf(EnumSet.of(SPECTATE))); private static final Map stateDependentFeatures = new HashMap<>(); diff --git a/FightSystem_Core/src/de/steamwar/fightsystem/utils/FightStatistics.java b/FightSystem_Core/src/de/steamwar/fightsystem/utils/FightStatistics.java index ac6d229..6cee3e2 100644 --- a/FightSystem_Core/src/de/steamwar/fightsystem/utils/FightStatistics.java +++ b/FightSystem_Core/src/de/steamwar/fightsystem/utils/FightStatistics.java @@ -33,7 +33,7 @@ import de.steamwar.sql.Schematic; import de.steamwar.sql.SteamwarUser; import org.bukkit.Bukkit; -import java.nio.file.Files; +import java.io.FileInputStream; import java.sql.Timestamp; import java.time.Instant; import java.util.logging.Level; @@ -97,9 +97,9 @@ public class FightStatistics { for (FightPlayer fp : Fight.getRedTeam().getPlayers()) savePlayerStats(fp, fightId); - setReplay(fightId, Files.readAllBytes(FileRecorder.getFile().toPath())); + setReplay(fightId, new FileInputStream(FileRecorder.getFile())); - if(ArenaMode.Event.contains(Config.mode)){ + if(ArenaMode.Event.contains(Config.mode)) { FightSystem.getEventFight().setFight(fightId); } }catch(Exception e){ diff --git a/FightSystem_Core/src/de/steamwar/fightsystem/utils/FightUI.java b/FightSystem_Core/src/de/steamwar/fightsystem/utils/FightUI.java index d5ab97f..211dec3 100644 --- a/FightSystem_Core/src/de/steamwar/fightsystem/utils/FightUI.java +++ b/FightSystem_Core/src/de/steamwar/fightsystem/utils/FightUI.java @@ -105,7 +105,12 @@ public class FightUI { break; case SPECTATE: default: - generator = (l, r, lP, rP, lW, rW) -> new Message("BAR_SPECTATE", time, l.getColoredName(), r.getColoredName()); + generator = (l, r, lP, rP, lW, rW) -> { + if(FightSystem.getLastWinner() == null) + return new Message("BAR_TIE", time, l.getColoredName(), r.getColoredName()); + else + return new Message("BAR_WIN", time, l.getColoredName(), r.getColoredName(), FightSystem.getLastWinner().getColoredName()); + }; break; } diff --git a/FightSystem_Core/src/de/steamwar/fightsystem/utils/FlatteningWrapper.java b/FightSystem_Core/src/de/steamwar/fightsystem/utils/FlatteningWrapper.java index c20412e..1317a16 100644 --- a/FightSystem_Core/src/de/steamwar/fightsystem/utils/FlatteningWrapper.java +++ b/FightSystem_Core/src/de/steamwar/fightsystem/utils/FlatteningWrapper.java @@ -21,7 +21,6 @@ package de.steamwar.fightsystem.utils; import de.steamwar.fightsystem.VersionDependent; import org.bukkit.DyeColor; -import org.bukkit.Material; import org.bukkit.World; import org.bukkit.block.Block; import org.bukkit.entity.EntityType; @@ -43,7 +42,7 @@ public class FlatteningWrapper { boolean containsBlockMeta(ItemMeta meta); boolean hasAttributeModifier(ItemStack stack); - Material onBreak(Material type); + ItemStack onBreak(Block type); boolean doRecord(BlockPhysicsEvent e);