Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package me.fatal;
- import org.bukkit.Location;
- import org.bukkit.Material;
- import org.bukkit.entity.Player;
- import net.md_5.bungee.api.ChatColor;
- public class JumpPadManager {
- public static float f;
- public static void CreatePad(Location loc, Player p, float fl) {
- f = fl;
- if (!JumpPad.blockLocs.contains(loc)) {
- p.sendMessage("Jump Pad created at > " + loc.getBlockX() + ", " + loc.getBlockY());
- //p.sendBlockChange(loc, Material.EMERALD_BLOCK, (byte)1);
- loc.getBlock().setType(Material.EMERALD_BLOCK);
- JumpPad.blockLocs.add(loc);
- } else {
- p.sendMessage(ChatColor.RED +"There is already a jump pad here, remove it with ");
- p.sendMessage(ChatColor.GREEN +" /jumppad remove");
- }
- }
- public static void RemovePad(Location loc, Player p) {
- if (JumpPad.blockLocs.contains(loc)) {
- p.sendMessage("Jump Pad removed " );
- //p.sendBlockChange(loc, Material.EMERALD_BLOCK, (byte)1);
- loc.getBlock().setType(Material.DIRT);
- JumpPad.blockLocs.remove(loc.getX() + loc.getY());
- } else {
- p.sendMessage(ChatColor.RED +"There is no jump pad stored in this location, ");
- p.sendMessage(ChatColor.GREEN + "create one with /jumppad create");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement