Fix freeze allow building of tnt #179
@ -19,11 +19,8 @@
|
|||||||
|
|
||||||
package de.steamwar.bausystem.commands;
|
package de.steamwar.bausystem.commands;
|
||||||
|
|
||||||
import de.steamwar.bausystem.BauSystem;
|
|
||||||
import de.steamwar.bausystem.world.Region;
|
import de.steamwar.bausystem.world.Region;
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.EntityType;
|
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.block.*;
|
import org.bukkit.event.block.*;
|
||||||
import org.bukkit.event.entity.EntityChangeBlockEvent;
|
import org.bukkit.event.entity.EntityChangeBlockEvent;
|
||||||
|
@ -29,7 +29,7 @@ import org.bukkit.event.EventHandler;
|
|||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.block.BlockBreakEvent;
|
import org.bukkit.event.block.BlockBreakEvent;
|
||||||
import org.bukkit.event.block.BlockPlaceEvent;
|
import org.bukkit.event.block.BlockCanBuildEvent;
|
||||||
import org.bukkit.event.block.SignChangeEvent;
|
import org.bukkit.event.block.SignChangeEvent;
|
||||||
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
|
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
|
||||||
|
|
||||||
@ -59,13 +59,13 @@ public class RegionListener implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.LOWEST)
|
@EventHandler(priority = EventPriority.LOWEST)
|
||||||
public void onBlockPlace(BlockPlaceEvent e) {
|
public void onBlockCanBuild(BlockCanBuildEvent e) {
|
||||||
Player p = e.getPlayer();
|
Player p = e.getPlayer();
|
||||||
|
|
||||||
try{
|
try{
|
||||||
if (Welt.noPermission(p, Permission.build)){
|
if (Welt.noPermission(p, Permission.build)){
|
||||||
p.sendMessage(BauSystem.PREFIX + "§cDu darfst hier keine Blöcke platzieren");
|
p.sendMessage(BauSystem.PREFIX + "§cDu darfst hier keine Blöcke platzieren");
|
||||||
e.setCancelled(true);
|
e.setBuildable(false);
|
||||||
}
|
}
|
||||||
}catch(NullPointerException ex){
|
}catch(NullPointerException ex){
|
||||||
//ignored, caused by worldedit brushes
|
//ignored, caused by worldedit brushes
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren