Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // Source code recreated from a .class file by IntelliJ IDEA
- // (powered by Fernflower decompiler)
- //
- package me.minebuilders.clearlag.removetype;
- import java.util.ArrayList;
- import java.util.List;
- import me.minebuilders.clearlag.annotations.ConfigPath;
- import me.minebuilders.clearlag.annotations.ConfigValue;
- import me.minebuilders.clearlag.modules.ClearModule;
- import org.bukkit.World;
- import org.bukkit.entity.Boat;
- import org.bukkit.entity.Entity;
- import org.bukkit.entity.ExperienceOrb;
- import org.bukkit.entity.FallingBlock;
- import org.bukkit.entity.Item;
- import org.bukkit.entity.ItemFrame;
- import org.bukkit.entity.Minecart;
- import org.bukkit.entity.Painting;
- import org.bukkit.entity.Projectile;
- import org.bukkit.entity.TNTPrimed;
- @ConfigPath(
- path = "limit"
- )
- public class LimitClear extends ClearModule {
- @ConfigValue
- private boolean item;
- @ConfigValue
- private List<Integer> itemFilter = new ArrayList();
- @ConfigValue
- private List<String> worldFilter = new ArrayList();
- @ConfigValue
- private boolean itemframe;
- @ConfigValue
- private boolean fallingBlock;
- @ConfigValue
- private boolean boat;
- @ConfigValue
- private boolean experienceOrb;
- @ConfigValue
- private boolean painting;
- @ConfigValue
- private boolean projectile;
- @ConfigValue
- private boolean primedTnt;
- @ConfigValue
- private boolean minecart;
- public LimitClear() {
- }
- public boolean isRemovable(Entity e) {
- 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))))))));
- }
- public boolean isWorldEnabled(World w) {
- return !this.worldFilter.contains(w.getName());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement