Dieser Commit ist enthalten in:
Ursprung
41d8db33ea
Commit
c304e77547
@ -26,6 +26,7 @@ import org.bukkit.entity.Player;
|
|||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.block.Action;
|
import org.bukkit.event.block.Action;
|
||||||
import org.bukkit.event.block.BlockBreakEvent;
|
import org.bukkit.event.block.BlockBreakEvent;
|
||||||
|
import org.bukkit.event.block.BlockPhysicsEvent;
|
||||||
import org.bukkit.event.block.BlockPlaceEvent;
|
import org.bukkit.event.block.BlockPlaceEvent;
|
||||||
import org.bukkit.event.entity.EntityDamageEvent;
|
import org.bukkit.event.entity.EntityDamageEvent;
|
||||||
import org.bukkit.event.entity.FoodLevelChangeEvent;
|
import org.bukkit.event.entity.FoodLevelChangeEvent;
|
||||||
@ -71,5 +72,31 @@ public class WorldInteraction extends BasicListener {
|
|||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
player.setVelocity(player.getLocation().getDirection().multiply(5).add(new Vector(0, 1, 0)));
|
player.setVelocity(player.getLocation().getDirection().multiply(5).add(new Vector(0, 1, 0)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void onBlockPhysics(BlockPhysicsEvent event) {
|
||||||
|
if (event.getSourceBlock().getType().name().endsWith("_PRESSURE_PLATE")) {
|
||||||
|
event.setCancelled(true);
|
||||||
|
}
|
||||||
|
if (event.getSourceBlock().getType().name().endsWith("_BUTTON")) {
|
||||||
|
event.setCancelled(true);
|
||||||
|
}
|
||||||
|
if (event.getSourceBlock().getType() == Material.LEVER) {
|
||||||
|
event.setCancelled(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void onPlayerInteract(PlayerInteractEvent event) {
|
||||||
|
if(ModifyCommand.modifying(event.getPlayer())) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (event.getClickedBlock() == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (event.getClickedBlock().getType().name().endsWith("_DOOR")) {
|
||||||
|
event.setCancelled(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren