Advertisement
Guest User

Untitled

a guest
Dec 15th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. package de.jatti.plugins.commands;
  2.  
  3. import java.util.HashMap;
  4.  
  5. import org.bukkit.entity.Entity;
  6. import org.bukkit.entity.EntityType;
  7. import org.bukkit.entity.Player;
  8.  
  9. public class PetCommand {
  10.  
  11. public static HashMap<Player, Entity> press = new HashMap<>();
  12. public static Object pet;
  13.  
  14.  
  15. public static void getPet(Player p) {
  16.  
  17. if(PetCommand.containsKey(p)) {
  18. removePet(p);
  19.  
  20. }
  21.  
  22. Entity e = p.getWorld().spawnEntity(p.getLocation(), EntityType.BLAZE);
  23. e.setCustomName(p.getName() + "ยงa Pet");
  24. e.setCustomNameVisible(true);
  25.  
  26. PetCommand.put(p, e);
  27.  
  28.  
  29. }
  30.  
  31. private static void put(Player p, Entity e) {
  32.  
  33.  
  34. }
  35.  
  36. static boolean containsKey(Player p) {
  37.  
  38. return false;
  39. }
  40.  
  41. public static void removePet(Player p) {
  42. if(PetCommand.containsKey(p)) {
  43. PetCommand.getPet(p).remove();
  44.  
  45.  
  46. }
  47.  
  48. }
  49.  
  50. public static void moveToPlayer(Player p) {
  51.  
  52. }
  53.  
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement