Advertisement
Guest User

Untitled

a guest
Sep 20th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. package me.fatal;
  2.  
  3. import org.bukkit.Location;
  4. import org.bukkit.Material;
  5. import org.bukkit.entity.Player;
  6.  
  7. import net.md_5.bungee.api.ChatColor;
  8.  
  9. public class JumpPadManager {
  10.  
  11.  
  12. public static float f;
  13. public static void CreatePad(Location loc, Player p, float fl) {
  14.  
  15. f = fl;
  16.  
  17. if (!JumpPad.blockLocs.contains(loc)) {
  18. p.sendMessage("Jump Pad created at > " + loc.getBlockX() + ", " + loc.getBlockY());
  19. //p.sendBlockChange(loc, Material.EMERALD_BLOCK, (byte)1);
  20. loc.getBlock().setType(Material.EMERALD_BLOCK);
  21. JumpPad.blockLocs.add(loc);
  22.  
  23. } else {
  24. p.sendMessage(ChatColor.RED +"There is already a jump pad here, remove it with ");
  25. p.sendMessage(ChatColor.GREEN +" /jumppad remove");
  26. }
  27.  
  28.  
  29.  
  30. }
  31.  
  32. public static void RemovePad(Location loc, Player p) {
  33.  
  34. if (JumpPad.blockLocs.contains(loc)) {
  35. p.sendMessage("Jump Pad removed " );
  36. //p.sendBlockChange(loc, Material.EMERALD_BLOCK, (byte)1);
  37. loc.getBlock().setType(Material.DIRT);
  38. JumpPad.blockLocs.remove(loc.getX() + loc.getY());
  39.  
  40. } else {
  41. p.sendMessage(ChatColor.RED +"There is no jump pad stored in this location, ");
  42. p.sendMessage(ChatColor.GREEN + "create one with /jumppad create");
  43.  
  44. }
  45. }
  46.  
  47.  
  48.  
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement