Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
Ursprung
c706f85254
Commit
2127af664d
@ -6,6 +6,7 @@ import de.steamwar.bausystem.linkage.Linked;
|
|||||||
import de.steamwar.bausystem.region.Region;
|
import de.steamwar.bausystem.region.Region;
|
||||||
import de.steamwar.bausystem.region.flags.Flag;
|
import de.steamwar.bausystem.region.flags.Flag;
|
||||||
import de.steamwar.bausystem.region.flags.flagvalues.FreezeMode;
|
import de.steamwar.bausystem.region.flags.flagvalues.FreezeMode;
|
||||||
|
import de.steamwar.core.Core;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
@ -98,4 +99,13 @@ public class FreezeListener implements Listener {
|
|||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void onBlockBreak(BlockBreakEvent event) {
|
||||||
|
if (Core.getVersion() < 19) return;
|
||||||
|
if (Region.getRegion(event.getBlock().getLocation()).get(Flag.FREEZE) == FreezeMode.ACTIVE) {
|
||||||
|
event.setCancelled(true);
|
||||||
|
event.getBlock().setType(Material.AIR, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren