Merge branch 'allOp'
Dieser Commit ist enthalten in:
Commit
074fcfd6ff
@ -1,7 +1,7 @@
|
|||||||
package de.steamwar.bausystem.commands;
|
package de.steamwar.bausystem.commands;
|
||||||
|
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.block.BlockPhysicsEvent;
|
import org.bukkit.event.block.*;
|
||||||
|
|
||||||
public class CommandFreeze extends ToggleCommand {
|
public class CommandFreeze extends ToggleCommand {
|
||||||
|
|
||||||
@ -30,4 +30,24 @@ public class CommandFreeze extends ToggleCommand {
|
|||||||
public void onPhysicsEvent(BlockPhysicsEvent e){
|
public void onPhysicsEvent(BlockPhysicsEvent e){
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void onPistonExtend(BlockPistonExtendEvent e){
|
||||||
|
e.setCancelled(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void onPistonRetract(BlockPistonRetractEvent e){
|
||||||
|
e.setCancelled(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void onBlockGrow(BlockGrowEvent e){
|
||||||
|
e.setCancelled(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void onRedstoneEvent(BlockRedstoneEvent e){
|
||||||
|
e.setNewCurrent(e.getOldCurrent());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,9 @@ package de.steamwar.bausystem.world;
|
|||||||
|
|
||||||
import de.steamwar.bausystem.BauSystem;
|
import de.steamwar.bausystem.BauSystem;
|
||||||
import de.steamwar.bausystem.Permission;
|
import de.steamwar.bausystem.Permission;
|
||||||
|
import de.steamwar.bausystem.commands.CommandFreeze;
|
||||||
import de.steamwar.core.Core;
|
import de.steamwar.core.Core;
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
@ -26,6 +28,12 @@ public class RegionListener implements Listener {
|
|||||||
if (Welt.noPermission(p, Permission.worldedit)){
|
if (Welt.noPermission(p, Permission.worldedit)){
|
||||||
p.sendMessage(BauSystem.PREFIX + "§cDu darfst hier kein WorldEdit benutzen");
|
p.sendMessage(BauSystem.PREFIX + "§cDu darfst hier kein WorldEdit benutzen");
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!CommandFreeze.getInstance().isOn()){
|
||||||
|
CommandFreeze.getInstance().toggle();
|
||||||
|
Bukkit.getScheduler().runTaskLater(BauSystem.getPlugin(), CommandFreeze.getInstance()::toggle, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren