Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void onPlayerMove(final PlayerMoveEvent event) {
- final Player player = event.getPlayer();
- final Location playerLoc = player.getLocation();
- final int ID = playerLoc.getWorld().getBlockAt(playerLoc).getRelative(0, -1, 0).getTypeId();
- final int plate = playerLoc.getWorld().getBlockAt(playerLoc).getTypeId();
- if (player instanceof Player && player.hasPermission("launcher.launch") && ID == this.getConfig().getInt("bottom-block-id") && plate == 70) {
- player.setVelocity(player.getLocation().getDirection().multiply(3));
- player.setVelocity(new Vector(player.getVelocity().getX(), 1.0, player.getVelocity().getZ()));
- player.playSound(player.getLocation(), Sound.valueOf(this.getConfig().getString("sound").toUpperCase()), 1.0f, 1.0f);
- Player[] onlinePlayers;
- for (int length = (onlinePlayers = Bukkit.getOnlinePlayers()).length, i = 0; i < length; ++i) {
- final Player all = onlinePlayers[i];
- all.playEffect(player.getLocation(), Effect.valueOf(this.getConfig().getString("effect").toUpperCase()), 4);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement