mirror of
https://github.com/Ste3et/furniture.git
synced 2024-11-25 03:55:24 +01:00
remove some registerEvents from the function files
This commit is contained in:
parent
0e6a05cd41
commit
650d283eb7
@ -11,7 +11,6 @@ import org.bukkit.Material;
|
|||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
import org.bukkit.entity.Firework;
|
import org.bukkit.entity.Firework;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.Listener;
|
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.inventory.meta.FireworkMeta;
|
import org.bukkit.inventory.meta.FireworkMeta;
|
||||||
import org.bukkit.util.EulerAngle;
|
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.fArmorStand;
|
||||||
import de.Ste3et_C0st.FurnitureLib.main.entity.fEntity;
|
import de.Ste3et_C0st.FurnitureLib.main.entity.fEntity;
|
||||||
|
|
||||||
public class FireworkLauncher extends Furniture implements Listener {
|
public class FireworkLauncher extends Furniture{
|
||||||
|
|
||||||
public FireworkLauncher(ObjectID id){
|
public FireworkLauncher(ObjectID id){
|
||||||
super(id);
|
super(id);
|
||||||
if(isFinish()){
|
if(isFinish()){
|
||||||
Bukkit.getPluginManager().registerEvents(this, getPlugin());
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
spawn(id.getStartLocation());
|
spawn(id.getStartLocation());
|
||||||
|
@ -9,23 +9,19 @@ import org.bukkit.Material;
|
|||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.entity.ItemFrame;
|
import org.bukkit.entity.ItemFrame;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
|
||||||
import org.bukkit.event.Listener;
|
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.util.EulerAngle;
|
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.Furniture;
|
||||||
import de.Ste3et_C0st.FurnitureLib.main.ObjectID;
|
import de.Ste3et_C0st.FurnitureLib.main.ObjectID;
|
||||||
import de.Ste3et_C0st.FurnitureLib.main.Type.BodyPart;
|
import de.Ste3et_C0st.FurnitureLib.main.Type.BodyPart;
|
||||||
import de.Ste3et_C0st.FurnitureLib.main.Type.SQLAction;
|
import de.Ste3et_C0st.FurnitureLib.main.Type.SQLAction;
|
||||||
import de.Ste3et_C0st.FurnitureLib.main.entity.fArmorStand;
|
import de.Ste3et_C0st.FurnitureLib.main.entity.fArmorStand;
|
||||||
|
|
||||||
public class billboard extends Furniture implements Listener{
|
public class billboard extends Furniture{
|
||||||
public billboard(ObjectID id){
|
public billboard(ObjectID id){
|
||||||
super(id);
|
super(id);
|
||||||
if(isFinish()){
|
if(isFinish()){
|
||||||
Bukkit.getPluginManager().registerEvents(this, main.getInstance());
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
spawn(id.getStartLocation());
|
spawn(id.getStartLocation());
|
||||||
|
@ -4,19 +4,17 @@ import org.bukkit.Bukkit;
|
|||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.Listener;
|
|
||||||
import org.bukkit.map.MapView;
|
import org.bukkit.map.MapView;
|
||||||
|
|
||||||
import de.Ste3et_C0st.Furniture.Camera.Utils.RenderClass;
|
import de.Ste3et_C0st.Furniture.Camera.Utils.RenderClass;
|
||||||
import de.Ste3et_C0st.Furniture.Camera.Utils.RenderClass.ScaleMode;
|
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.Utilitis.Relative;
|
||||||
import de.Ste3et_C0st.FurnitureLib.main.FurnitureHelper;
|
import de.Ste3et_C0st.FurnitureLib.main.FurnitureHelper;
|
||||||
import de.Ste3et_C0st.FurnitureLib.main.ObjectID;
|
import de.Ste3et_C0st.FurnitureLib.main.ObjectID;
|
||||||
import de.Ste3et_C0st.FurnitureLib.main.Type.SQLAction;
|
import de.Ste3et_C0st.FurnitureLib.main.Type.SQLAction;
|
||||||
import de.Ste3et_C0st.FurnitureLib.main.entity.fEntity;
|
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 fEntity entity = null, entity2 = null;
|
||||||
private String zoom = "#ZOOM0#";
|
private String zoom = "#ZOOM0#";
|
||||||
@ -24,8 +22,6 @@ public class camera extends FurnitureHelper implements Listener{
|
|||||||
|
|
||||||
public camera(ObjectID id){
|
public camera(ObjectID id){
|
||||||
super(id);
|
super(id);
|
||||||
Bukkit.getPluginManager().registerEvents(this, main.instance);
|
|
||||||
|
|
||||||
boolean b = false;
|
boolean b = false;
|
||||||
for(fEntity stand : id.getPacketList()){
|
for(fEntity stand : id.getPacketList()){
|
||||||
if(stand.getCustomName().startsWith("#ZOOM")){
|
if(stand.getCustomName().startsWith("#ZOOM")){
|
||||||
|
@ -11,17 +11,15 @@ import org.bukkit.block.BlockFace;
|
|||||||
import org.bukkit.block.BlockState;
|
import org.bukkit.block.BlockState;
|
||||||
import org.bukkit.block.Sign;
|
import org.bukkit.block.Sign;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.Listener;
|
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.inventory.meta.BookMeta;
|
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.Utilitis.LocationUtil;
|
||||||
import de.Ste3et_C0st.FurnitureLib.main.FurnitureHelper;
|
import de.Ste3et_C0st.FurnitureLib.main.FurnitureHelper;
|
||||||
import de.Ste3et_C0st.FurnitureLib.main.ObjectID;
|
import de.Ste3et_C0st.FurnitureLib.main.ObjectID;
|
||||||
import de.Ste3et_C0st.FurnitureLib.main.Type.SQLAction;
|
import de.Ste3et_C0st.FurnitureLib.main.Type.SQLAction;
|
||||||
|
|
||||||
public class graveStone extends FurnitureHelper implements Listener{
|
public class graveStone extends FurnitureHelper{
|
||||||
|
|
||||||
private Location signLoc;
|
private Location signLoc;
|
||||||
private Block sign;
|
private Block sign;
|
||||||
@ -30,7 +28,6 @@ public class graveStone extends FurnitureHelper implements Listener{
|
|||||||
public graveStone(ObjectID id) {
|
public graveStone(ObjectID id) {
|
||||||
super(id);
|
super(id);
|
||||||
setBlock();
|
setBlock();
|
||||||
Bukkit.getPluginManager().registerEvents(this, main.instance);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
|
@ -3,11 +3,9 @@ package de.Ste3et_C0st.Furniture.Objects.garden;
|
|||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.Listener;
|
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.util.EulerAngle;
|
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.FurnitureHelper;
|
||||||
import de.Ste3et_C0st.FurnitureLib.main.ObjectID;
|
import de.Ste3et_C0st.FurnitureLib.main.ObjectID;
|
||||||
import de.Ste3et_C0st.FurnitureLib.main.Type.BodyPart;
|
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.fArmorStand;
|
||||||
import de.Ste3et_C0st.FurnitureLib.main.entity.fEntity;
|
import de.Ste3et_C0st.FurnitureLib.main.entity.fEntity;
|
||||||
|
|
||||||
public class sunshade extends FurnitureHelper implements Listener{
|
public class sunshade extends FurnitureHelper{
|
||||||
|
|
||||||
public boolean isRunning = false;
|
public boolean isRunning = false;
|
||||||
Integer timer;
|
Integer timer;
|
||||||
|
|
||||||
public sunshade(ObjectID id) {
|
public sunshade(ObjectID id) {
|
||||||
super(id);
|
super(id);
|
||||||
Bukkit.getPluginManager().registerEvents(this, main.instance);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isOpen(fArmorStand packet){
|
private boolean isOpen(fArmorStand packet){
|
||||||
@ -50,7 +47,6 @@ public class sunshade extends FurnitureHelper implements Listener{
|
|||||||
packet.getInventory().setHelmet(is.clone());
|
packet.getInventory().setHelmet(is.clone());
|
||||||
}else if(packet.getInventory().getHelmet()!=null&&packet.getInventory().getHelmet().getType().name().contains("CARPET")){
|
}else if(packet.getInventory().getHelmet()!=null&&packet.getInventory().getHelmet().getType().name().contains("CARPET")){
|
||||||
ItemStack item = new ItemStack(Material.WHITE_CARPET);
|
ItemStack item = new ItemStack(Material.WHITE_CARPET);
|
||||||
item.setDurability(getLutil().getFromDey((short) is.getDurability()));
|
|
||||||
packet.getInventory().setHelmet(item);
|
packet.getInventory().setHelmet(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,11 +12,9 @@ import org.bukkit.block.BlockFace;
|
|||||||
import org.bukkit.block.BlockState;
|
import org.bukkit.block.BlockState;
|
||||||
import org.bukkit.block.Chest;
|
import org.bukkit.block.Chest;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.Listener;
|
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.util.EulerAngle;
|
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.Furniture;
|
||||||
import de.Ste3et_C0st.FurnitureLib.main.ObjectID;
|
import de.Ste3et_C0st.FurnitureLib.main.ObjectID;
|
||||||
import de.Ste3et_C0st.FurnitureLib.main.Type.BodyPart;
|
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.Type.SQLAction;
|
||||||
import de.Ste3et_C0st.FurnitureLib.main.entity.fArmorStand;
|
import de.Ste3et_C0st.FurnitureLib.main.entity.fArmorStand;
|
||||||
|
|
||||||
public class tent_2 extends Furniture implements Listener{
|
public class tent_2 extends Furniture{
|
||||||
Integer id;
|
Integer id;
|
||||||
List<Block> block = new ArrayList<Block>();
|
List<Block> block = new ArrayList<Block>();
|
||||||
Location bedLoc;
|
Location bedLoc;
|
||||||
@ -49,7 +47,6 @@ public class tent_2 extends Furniture implements Listener{
|
|||||||
setBlock(loca);
|
setBlock(loca);
|
||||||
|
|
||||||
if(id.isFinish()){
|
if(id.isFinish()){
|
||||||
Bukkit.getPluginManager().registerEvents(this, main.getInstance());
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
spawn(loc);
|
spawn(loc);
|
||||||
|
Loading…
Reference in New Issue
Block a user