Advertisement
Guest User

Untitled

a guest
Jun 26th, 2016
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.10 KB | None | 0 0
  1. //
  2. // Source code recreated from a .class file by IntelliJ IDEA
  3. // (powered by Fernflower decompiler)
  4. //
  5.  
  6. package me.minebuilders.clearlag.removetype;
  7.  
  8. import java.util.ArrayList;
  9. import java.util.List;
  10. import me.minebuilders.clearlag.annotations.ConfigPath;
  11. import me.minebuilders.clearlag.annotations.ConfigValue;
  12. import me.minebuilders.clearlag.modules.ClearModule;
  13. import org.bukkit.World;
  14. import org.bukkit.entity.Boat;
  15. import org.bukkit.entity.Entity;
  16. import org.bukkit.entity.ExperienceOrb;
  17. import org.bukkit.entity.FallingBlock;
  18. import org.bukkit.entity.Item;
  19. import org.bukkit.entity.ItemFrame;
  20. import org.bukkit.entity.Minecart;
  21. import org.bukkit.entity.Painting;
  22. import org.bukkit.entity.Projectile;
  23. import org.bukkit.entity.TNTPrimed;
  24.  
  25. @ConfigPath(
  26. path = "limit"
  27. )
  28. public class LimitClear extends ClearModule {
  29. @ConfigValue
  30. private boolean item;
  31. @ConfigValue
  32. private List<Integer> itemFilter = new ArrayList();
  33. @ConfigValue
  34. private List<String> worldFilter = new ArrayList();
  35. @ConfigValue
  36. private boolean itemframe;
  37. @ConfigValue
  38. private boolean fallingBlock;
  39. @ConfigValue
  40. private boolean boat;
  41. @ConfigValue
  42. private boolean experienceOrb;
  43. @ConfigValue
  44. private boolean painting;
  45. @ConfigValue
  46. private boolean projectile;
  47. @ConfigValue
  48. private boolean primedTnt;
  49. @ConfigValue
  50. private boolean minecart;
  51.  
  52. public LimitClear() {
  53. }
  54.  
  55. public boolean isRemovable(Entity e) {
  56. return e instanceof Item?this.item && !this.itemFilter.contains(Integer.valueOf(((Item)e).getItemStack().getTypeId())):(e instanceof ItemFrame?this.itemframe:(e instanceof FallingBlock?this.fallingBlock:(e instanceof Boat?e.isEmpty() && this.boat:(e instanceof ExperienceOrb?this.experienceOrb:(e instanceof Painting?this.painting:(e instanceof Projectile?this.projectile:(e instanceof TNTPrimed?this.primedTnt:(!(e instanceof Minecart)?false:e.isEmpty() && this.minecart))))))));
  57. }
  58.  
  59. public boolean isWorldEnabled(World w) {
  60. return !this.worldFilter.contains(w.getName());
  61. }
  62. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement