remove some registerEvents from the function files

This commit is contained in:
Ste3et_C0st 2019-02-24 13:19:28 +01:00
parent 0e6a05cd41
commit 650d283eb7
6 changed files with 6 additions and 26 deletions

View File

@ -11,7 +11,6 @@ import org.bukkit.Material;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Firework;
import org.bukkit.entity.Player;
import org.bukkit.event.Listener;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.FireworkMeta;
import org.bukkit.util.EulerAngle;
@ -22,12 +21,11 @@ import de.Ste3et_C0st.FurnitureLib.main.Type.SQLAction;
import de.Ste3et_C0st.FurnitureLib.main.entity.fArmorStand;
import de.Ste3et_C0st.FurnitureLib.main.entity.fEntity;
public class FireworkLauncher extends Furniture implements Listener {
public class FireworkLauncher extends Furniture{
public FireworkLauncher(ObjectID id){
super(id);
if(isFinish()){
Bukkit.getPluginManager().registerEvents(this, getPlugin());
return;
}
spawn(id.getStartLocation());

View File

@ -9,23 +9,19 @@ import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.entity.ItemFrame;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.inventory.ItemStack;
import org.bukkit.util.EulerAngle;
import de.Ste3et_C0st.Furniture.Main.main;
import de.Ste3et_C0st.FurnitureLib.main.Furniture;
import de.Ste3et_C0st.FurnitureLib.main.ObjectID;
import de.Ste3et_C0st.FurnitureLib.main.Type.BodyPart;
import de.Ste3et_C0st.FurnitureLib.main.Type.SQLAction;
import de.Ste3et_C0st.FurnitureLib.main.entity.fArmorStand;
public class billboard extends Furniture implements Listener{
public class billboard extends Furniture{
public billboard(ObjectID id){
super(id);
if(isFinish()){
Bukkit.getPluginManager().registerEvents(this, main.getInstance());
return;
}
spawn(id.getStartLocation());

View File

@ -4,19 +4,17 @@ import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.event.Listener;
import org.bukkit.map.MapView;
import de.Ste3et_C0st.Furniture.Camera.Utils.RenderClass;
import de.Ste3et_C0st.Furniture.Camera.Utils.RenderClass.ScaleMode;
import de.Ste3et_C0st.Furniture.Main.main;
import de.Ste3et_C0st.FurnitureLib.Utilitis.Relative;
import de.Ste3et_C0st.FurnitureLib.main.FurnitureHelper;
import de.Ste3et_C0st.FurnitureLib.main.ObjectID;
import de.Ste3et_C0st.FurnitureLib.main.Type.SQLAction;
import de.Ste3et_C0st.FurnitureLib.main.entity.fEntity;
public class camera extends FurnitureHelper implements Listener{
public class camera extends FurnitureHelper{
private fEntity entity = null, entity2 = null;
private String zoom = "#ZOOM0#";
@ -24,8 +22,6 @@ public class camera extends FurnitureHelper implements Listener{
public camera(ObjectID id){
super(id);
Bukkit.getPluginManager().registerEvents(this, main.instance);
boolean b = false;
for(fEntity stand : id.getPacketList()){
if(stand.getCustomName().startsWith("#ZOOM")){

View File

@ -11,17 +11,15 @@ import org.bukkit.block.BlockFace;
import org.bukkit.block.BlockState;
import org.bukkit.block.Sign;
import org.bukkit.entity.Player;
import org.bukkit.event.Listener;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.BookMeta;
import de.Ste3et_C0st.Furniture.Main.main;
import de.Ste3et_C0st.FurnitureLib.Utilitis.LocationUtil;
import de.Ste3et_C0st.FurnitureLib.main.FurnitureHelper;
import de.Ste3et_C0st.FurnitureLib.main.ObjectID;
import de.Ste3et_C0st.FurnitureLib.main.Type.SQLAction;
public class graveStone extends FurnitureHelper implements Listener{
public class graveStone extends FurnitureHelper{
private Location signLoc;
private Block sign;
@ -30,7 +28,6 @@ public class graveStone extends FurnitureHelper implements Listener{
public graveStone(ObjectID id) {
super(id);
setBlock();
Bukkit.getPluginManager().registerEvents(this, main.instance);
}
@SuppressWarnings("deprecation")

View File

@ -3,11 +3,9 @@ package de.Ste3et_C0st.Furniture.Objects.garden;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.event.Listener;
import org.bukkit.inventory.ItemStack;
import org.bukkit.util.EulerAngle;
import de.Ste3et_C0st.Furniture.Main.main;
import de.Ste3et_C0st.FurnitureLib.main.FurnitureHelper;
import de.Ste3et_C0st.FurnitureLib.main.ObjectID;
import de.Ste3et_C0st.FurnitureLib.main.Type.BodyPart;
@ -15,14 +13,13 @@ import de.Ste3et_C0st.FurnitureLib.main.Type.SQLAction;
import de.Ste3et_C0st.FurnitureLib.main.entity.fArmorStand;
import de.Ste3et_C0st.FurnitureLib.main.entity.fEntity;
public class sunshade extends FurnitureHelper implements Listener{
public class sunshade extends FurnitureHelper{
public boolean isRunning = false;
Integer timer;
public sunshade(ObjectID id) {
super(id);
Bukkit.getPluginManager().registerEvents(this, main.instance);
}
private boolean isOpen(fArmorStand packet){
@ -50,7 +47,6 @@ public class sunshade extends FurnitureHelper implements Listener{
packet.getInventory().setHelmet(is.clone());
}else if(packet.getInventory().getHelmet()!=null&&packet.getInventory().getHelmet().getType().name().contains("CARPET")){
ItemStack item = new ItemStack(Material.WHITE_CARPET);
item.setDurability(getLutil().getFromDey((short) is.getDurability()));
packet.getInventory().setHelmet(item);
}
}

View File

@ -12,11 +12,9 @@ import org.bukkit.block.BlockFace;
import org.bukkit.block.BlockState;
import org.bukkit.block.Chest;
import org.bukkit.entity.Player;
import org.bukkit.event.Listener;
import org.bukkit.inventory.ItemStack;
import org.bukkit.util.EulerAngle;
import de.Ste3et_C0st.Furniture.Main.main;
import de.Ste3et_C0st.FurnitureLib.main.Furniture;
import de.Ste3et_C0st.FurnitureLib.main.ObjectID;
import de.Ste3et_C0st.FurnitureLib.main.Type.BodyPart;
@ -25,7 +23,7 @@ import de.Ste3et_C0st.FurnitureLib.main.Type.DyeColor;
import de.Ste3et_C0st.FurnitureLib.main.Type.SQLAction;
import de.Ste3et_C0st.FurnitureLib.main.entity.fArmorStand;
public class tent_2 extends Furniture implements Listener{
public class tent_2 extends Furniture{
Integer id;
List<Block> block = new ArrayList<Block>();
Location bedLoc;
@ -49,7 +47,6 @@ public class tent_2 extends Furniture implements Listener{
setBlock(loca);
if(id.isFinish()){
Bukkit.getPluginManager().registerEvents(this, main.getInstance());
return;
}
spawn(loc);