Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @EventHandler
- public void onPlayerVelocity(PlayerVelocityEvent paramPlayerVelocityEvent)
- {
- final Player localPlayer = paramPlayerVelocityEvent.getPlayer();
- final Location localLocation = localPlayer.getLocation();
- Bukkit.getScheduler().runTaskLater(null, new Runnable()
- {
- public void run()
- {
- if ((!localPlayer.isOnline()) || (!localPlayer.isValid()) || (localPlayer == null)) {
- return;
- }
- if (localPlayer.getVehicle() != null) {
- return;
- }
- if (localPlayer.getLocation().add(0.0D, 2.0D, 0.0D).getBlock().getType() != Material.AIR) {
- return;
- }
- if (localPlayer.getFoodLevel() == 0) {
- return;
- }
- if (localPlayer.getLocation().distanceSquared(localLocation) == 0.0D)
- {
- localPlayer.kickPlayer("§6§lOAC §b§l>> §cKicked: \n§rYou were kicked for suspicious movements!");
- }
- }
- }, 3L);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement