pintux98
5 years ago
24 changed files with 615 additions and 388 deletions
@ -0,0 +1,57 @@ |
|||||
|
size: 27 |
||||
|
title: '&aThe Bridge - Particles' |
||||
|
unlocked: |
||||
|
- <description> |
||||
|
- '&7' |
||||
|
- '&eClick to select!' |
||||
|
noPerm: |
||||
|
- <description> |
||||
|
- '&7' |
||||
|
- '&aPrice: &6<price>' |
||||
|
- '&7' |
||||
|
- '&cYou dont have permission!' |
||||
|
locked: |
||||
|
- <description> |
||||
|
- '&7' |
||||
|
- '&aPrice: &6<price>' |
||||
|
- '&7' |
||||
|
- '&eClick to buy this!' |
||||
|
trails: |
||||
|
arrow: |
||||
|
title: '&aThe Bridge - Arrow Trails' |
||||
|
size: 36 |
||||
|
effects: |
||||
|
default: |
||||
|
icon: ARROW |
||||
|
data: 0 |
||||
|
amount: 1 |
||||
|
slot: 0 |
||||
|
price: 0 |
||||
|
isBuy: true |
||||
|
name: "Default Arrow Effect" |
||||
|
effect: |
||||
|
type: CRIT |
||||
|
ammount: 20 |
||||
|
permission: bridges.arrow.default |
||||
|
description: |
||||
|
- '&fDefault effect to all' |
||||
|
- '&fplayers' |
||||
|
feet: |
||||
|
title: '&aThe Bridge - Feet Trails' |
||||
|
size: 36 |
||||
|
effects: |
||||
|
default: |
||||
|
icon: IRON_BOOTS |
||||
|
data: 0 |
||||
|
amount: 1 |
||||
|
slot: 0 |
||||
|
price: 0 |
||||
|
isBuy: true |
||||
|
name: "Default Feet Effect" |
||||
|
effect: |
||||
|
type: CRIT |
||||
|
ammount: 20 |
||||
|
permission: bridges.feet.default |
||||
|
description: |
||||
|
- '&fDefault effect to all' |
||||
|
- '&fplayers' |
@ -1,5 +0,0 @@ |
|||||
package cx.sfy.TheBridge.game; |
|
||||
|
|
||||
public class Game { |
|
||||
|
|
||||
} |
|
@ -1,59 +0,0 @@ |
|||||
package cx.sfy.TheBridge.managers; |
|
||||
|
|
||||
import java.util.ArrayList; |
|
||||
import java.util.HashMap; |
|
||||
import java.util.List; |
|
||||
|
|
||||
import org.bukkit.configuration.ConfigurationSection; |
|
||||
|
|
||||
import cx.sfy.TheBridge.Main; |
|
||||
import cx.sfy.TheBridge.cosmetics.Arrow; |
|
||||
import lombok.Getter; |
|
||||
|
|
||||
public class ArrowManager { |
|
||||
|
|
||||
Main plugin; |
|
||||
@Getter |
|
||||
private HashMap<String, Arrow> arrows = new HashMap<String, Arrow>(); |
|
||||
@Getter |
|
||||
private List<String> unlocked = null; |
|
||||
@Getter |
|
||||
private List<String> locked = null; |
|
||||
@Getter |
|
||||
private List<String> noPerm = null; |
|
||||
|
|
||||
public ArrowManager(Main plugin) { |
|
||||
this.plugin = plugin; |
|
||||
loadArrows(); |
|
||||
} |
|
||||
|
|
||||
public void loadArrows() { |
|
||||
List<String> un = new ArrayList<String>(); |
|
||||
for (String u : plugin.getArrow().getList("unlocked")) { |
|
||||
un.add(u); |
|
||||
} |
|
||||
unlocked = un; |
|
||||
List<String> lo = new ArrayList<String>(); |
|
||||
for (String l : plugin.getArrow().getList("locked")) { |
|
||||
lo.add(l); |
|
||||
} |
|
||||
locked = lo; |
|
||||
List<String> pe = new ArrayList<String>(); |
|
||||
for (String p : plugin.getArrow().getList("noPerm")) { |
|
||||
pe.add(p); |
|
||||
} |
|
||||
noPerm = pe; |
|
||||
ConfigurationSection conf = plugin.getArrow().getConfig().getConfigurationSection("arrows"); |
|
||||
for (String arrow : conf.getKeys(false)) { |
|
||||
arrows.put(arrow, new Arrow(plugin, "arrows." + arrow, arrow)); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
public Arrow getArrowByName(String name) { |
|
||||
if (arrows.containsKey(name)) { |
|
||||
return arrows.get(name); |
|
||||
} |
|
||||
return null; |
|
||||
} |
|
||||
|
|
||||
} |
|
@ -0,0 +1,72 @@ |
|||||
|
package cx.sfy.TheBridge.managers; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.HashMap; |
||||
|
import java.util.List; |
||||
|
|
||||
|
import org.bukkit.configuration.ConfigurationSection; |
||||
|
|
||||
|
import cx.sfy.TheBridge.Main; |
||||
|
import cx.sfy.TheBridge.cosmetics.Particle; |
||||
|
import lombok.Getter; |
||||
|
|
||||
|
public class ParticleManager { |
||||
|
|
||||
|
Main plugin; |
||||
|
@Getter |
||||
|
private HashMap<String, Particle> arrow_trails = new HashMap<String, Particle>(); |
||||
|
@Getter |
||||
|
private HashMap<String, Particle> feet_trails = new HashMap<String, Particle>(); |
||||
|
@Getter |
||||
|
private List<String> unlocked = null; |
||||
|
@Getter |
||||
|
private List<String> locked = null; |
||||
|
@Getter |
||||
|
private List<String> noPerm = null; |
||||
|
|
||||
|
public ParticleManager(Main plugin) { |
||||
|
this.plugin = plugin; |
||||
|
loadParticles(); |
||||
|
} |
||||
|
|
||||
|
public void loadParticles() { |
||||
|
List<String> un = new ArrayList<String>(); |
||||
|
for (String u : plugin.getParticles().getList("unlocked")) { |
||||
|
un.add(u); |
||||
|
} |
||||
|
unlocked = un; |
||||
|
List<String> lo = new ArrayList<String>(); |
||||
|
for (String l : plugin.getParticles().getList("locked")) { |
||||
|
lo.add(l); |
||||
|
} |
||||
|
locked = lo; |
||||
|
List<String> pe = new ArrayList<String>(); |
||||
|
for (String p : plugin.getParticles().getList("noPerm")) { |
||||
|
pe.add(p); |
||||
|
} |
||||
|
noPerm = pe; |
||||
|
ConfigurationSection conf = plugin.getParticles().getConfig().getConfigurationSection("trails.arrow.effects"); |
||||
|
for (String arrow : conf.getKeys(false)) { |
||||
|
arrow_trails.put(arrow, new Particle(plugin, "trails.arrow.effects." + arrow, arrow)); |
||||
|
} |
||||
|
ConfigurationSection conf1 = plugin.getParticles().getConfig().getConfigurationSection("trails.feet.effects"); |
||||
|
for (String feet : conf1.getKeys(false)) { |
||||
|
feet_trails.put(feet, new Particle(plugin, "trails.feet.effects." + feet, feet)); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public Particle getParticleByName(String type, String name) { |
||||
|
if (arrow_trails.containsKey(name) || feet_trails.containsKey(name)) { |
||||
|
switch (type.toUpperCase()) { |
||||
|
case "FEET": |
||||
|
return feet_trails.get(name); |
||||
|
case "ARROW": |
||||
|
return arrow_trails.get(name); |
||||
|
default: |
||||
|
return null; |
||||
|
} |
||||
|
} |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
} |
@ -1,24 +1,23 @@ |
|||||
package cx.sfy.TheBridge.menus; |
|
||||
|
package cx.sfy.TheBridge.menus.particle; |
||||
|
|
||||
import org.bukkit.Bukkit; |
import org.bukkit.Bukkit; |
||||
import org.bukkit.entity.Player; |
import org.bukkit.entity.Player; |
||||
import org.bukkit.inventory.Inventory; |
import org.bukkit.inventory.Inventory; |
||||
|
|
||||
import cx.sfy.TheBridge.Main; |
import cx.sfy.TheBridge.Main; |
||||
import cx.sfy.TheBridge.cosmetics.Arrow; |
|
||||
|
import cx.sfy.TheBridge.cosmetics.Particle; |
||||
|
|
||||
public class ArrowMenu { |
|
||||
|
public class ArrowTrailMenu { |
||||
Main plugin; |
Main plugin; |
||||
|
|
||||
public ArrowMenu(Main plugin) { |
|
||||
|
public ArrowTrailMenu(Main plugin) { |
||||
this.plugin = plugin; |
this.plugin = plugin; |
||||
} |
} |
||||
|
|
||||
public void createArrowMenu(Player p) { |
public void createArrowMenu(Player p) { |
||||
Inventory inv = Bukkit.getServer().createInventory(null, plugin.getArrow().getInt("size"), |
|
||||
plugin.getArrow().get("title")); |
|
||||
for (Arrow arrow : plugin.getArm().getArrows().values()) { |
|
||||
System.out.println(arrow == null); |
|
||||
|
Inventory inv = Bukkit.getServer().createInventory(null, plugin.getParticles().getInt("trails.arrow.size"), |
||||
|
plugin.getParticles().get("trails.arrow.title")); |
||||
|
for (Particle arrow : plugin.getPam().getArrow_trails().values()) { |
||||
if (!arrow.isBuy() && !p.hasPermission(arrow.getPermission())) { |
if (!arrow.isBuy() && !p.hasPermission(arrow.getPermission())) { |
||||
inv.setItem(arrow.getSlot(), arrow.getPermIcon()); |
inv.setItem(arrow.getSlot(), arrow.getPermIcon()); |
||||
} else if (arrow.isBuy() && !p.hasPermission(arrow.getPermission())) { |
} else if (arrow.isBuy() && !p.hasPermission(arrow.getPermission())) { |
@ -0,0 +1,32 @@ |
|||||
|
package cx.sfy.TheBridge.menus.particle; |
||||
|
|
||||
|
import org.bukkit.Bukkit; |
||||
|
import org.bukkit.entity.Player; |
||||
|
import org.bukkit.inventory.Inventory; |
||||
|
|
||||
|
import cx.sfy.TheBridge.Main; |
||||
|
import cx.sfy.TheBridge.cosmetics.Particle; |
||||
|
|
||||
|
public class FeetTrailMenu { |
||||
|
Main plugin; |
||||
|
|
||||
|
public FeetTrailMenu(Main plugin) { |
||||
|
this.plugin = plugin; |
||||
|
} |
||||
|
|
||||
|
public void createFeetMenu(Player p) { |
||||
|
Inventory inv = Bukkit.getServer().createInventory(null, plugin.getParticles().getInt("trails.feet.size"), |
||||
|
plugin.getParticles().get("trails.feet.title")); |
||||
|
for (Particle feet : plugin.getPam().getFeet_trails().values()) { |
||||
|
if (!feet.isBuy() && !p.hasPermission(feet.getPermission())) { |
||||
|
inv.setItem(feet.getSlot(), feet.getPermIcon()); |
||||
|
} else if (feet.isBuy() && !p.hasPermission(feet.getPermission())) { |
||||
|
inv.setItem(feet.getSlot(), feet.getBuyIcon()); |
||||
|
} else { |
||||
|
inv.setItem(feet.getSlot(), feet.getHasIcon()); |
||||
|
} |
||||
|
} |
||||
|
p.openInventory(inv); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,40 @@ |
|||||
|
package cx.sfy.TheBridge.menus.particle; |
||||
|
|
||||
|
import org.bukkit.Bukkit; |
||||
|
import org.bukkit.Material; |
||||
|
import org.bukkit.entity.Player; |
||||
|
import org.bukkit.inventory.Inventory; |
||||
|
import org.bukkit.inventory.ItemStack; |
||||
|
|
||||
|
import cx.sfy.TheBridge.Main; |
||||
|
import cx.sfy.TheBridge.utils.ItemBuilder; |
||||
|
|
||||
|
public class TrailMenu { |
||||
|
Main plugin; |
||||
|
|
||||
|
public TrailMenu(Main plugin) { |
||||
|
this.plugin = plugin; |
||||
|
} |
||||
|
|
||||
|
public void createTrailMenu(Player p) { |
||||
|
Inventory inv = Bukkit.getServer().createInventory(null, plugin.getParticles().getInt("size"), |
||||
|
plugin.getParticles().get("title")); |
||||
|
ItemStack arrow = ItemBuilder.item( |
||||
|
Material.valueOf(plugin.getConfig().getString("shop.trails.type.arrow.icon")), |
||||
|
plugin.getConfig().getInt("shop.trails.type.arrow.amount"), |
||||
|
(short) plugin.getConfig().getInt("shop.trails.type.arrow.data"), |
||||
|
plugin.getLang().get("shop.trails.type.arrow.nameItem"), |
||||
|
plugin.getLang().get("shop.trails.type.arrow.loreItem")); |
||||
|
ItemStack feet = ItemBuilder.item(Material.valueOf(plugin.getConfig().getString("shop.trails.type.feet.icon")), |
||||
|
plugin.getConfig().getInt("shop.trails.type.feet.amount"), |
||||
|
(short) plugin.getConfig().getInt("shop.trails.type.feet.data"), |
||||
|
plugin.getLang().get("shop.trails.type.feet.nameItem"), |
||||
|
plugin.getLang().get("shop.trails.type.feet.loreItem")); |
||||
|
|
||||
|
inv.setItem(plugin.getConfig().getInt("shop.trails.type.arrow.slot"), arrow); |
||||
|
inv.setItem(plugin.getConfig().getInt("shop.trails.type.feet.slot"), feet); |
||||
|
|
||||
|
p.openInventory(inv); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,226 @@ |
|||||
|
package cx.sfy.TheBridge.packets; |
||||
|
|
||||
|
import java.lang.reflect.Constructor; |
||||
|
import java.lang.reflect.Field; |
||||
|
import java.lang.reflect.InvocationTargetException; |
||||
|
import java.lang.reflect.Method; |
||||
|
import java.util.HashMap; |
||||
|
|
||||
|
import org.bukkit.Bukkit; |
||||
|
import org.bukkit.Location; |
||||
|
import org.bukkit.entity.Entity; |
||||
|
import org.bukkit.entity.Player; |
||||
|
|
||||
|
@SuppressWarnings({ "unchecked", "rawtypes" }) |
||||
|
public class ParticleHandler { |
||||
|
private static Class<?> packetClass = null; |
||||
|
private static Constructor<?> packetConstructor = null; |
||||
|
private static Field player_connection = null; |
||||
|
private static Method player_sendPacket = null; |
||||
|
private static HashMap<Class<? extends Entity>, Method> handles = new HashMap<Class<? extends Entity>, Method>(); |
||||
|
|
||||
|
private static boolean newParticlePacketConstructor = false; |
||||
|
private static Class<Enum> enumParticle = null; |
||||
|
|
||||
|
private ParticleType type; |
||||
|
private double speed; |
||||
|
private int count; |
||||
|
private double radius; |
||||
|
|
||||
|
private static boolean compatible = true; |
||||
|
|
||||
|
public static void load() { |
||||
|
String vString = getVersion().replace("v", ""); |
||||
|
double v = 0; |
||||
|
if (!vString.isEmpty()) { |
||||
|
String[] array = vString.split("_"); |
||||
|
v = Double.parseDouble(array[0] + "." + array[1]); |
||||
|
} |
||||
|
try { |
||||
|
Bukkit.getLogger().info("[ParticleHandler] Hooking into Netty NMS classes"); |
||||
|
packetClass = getNmsClass("PacketPlayOutWorldParticles"); |
||||
|
if (v == 1.8 || v == 1.9 || v == 1.10 || v == 1.11 || v == 1.12) { |
||||
|
Bukkit.getLogger().info("[ParticleHandler] Version is " + v + " - using old packet constructor"); |
||||
|
enumParticle = (Class<Enum>) getNmsClass("EnumParticle"); |
||||
|
packetConstructor = packetClass.getDeclaredConstructor(enumParticle, boolean.class, float.class, |
||||
|
float.class, float.class, float.class, float.class, float.class, float.class, int.class, |
||||
|
int[].class); |
||||
|
} else { |
||||
|
Bukkit.getLogger().info("[ParticleHandler] Version is " + v + " - using new packet constructor"); |
||||
|
newParticlePacketConstructor = true; |
||||
|
enumParticle = (Class<Enum>) getNmsClass("EnumParticle"); |
||||
|
packetConstructor = packetClass.getDeclaredConstructor(enumParticle, boolean.class, float.class, |
||||
|
float.class, float.class, float.class, float.class, float.class, float.class, int.class); |
||||
|
} |
||||
|
} catch (Exception ex) { |
||||
|
ex.printStackTrace(); |
||||
|
Bukkit.getLogger().severe("[ParticleHandler] Failed to initialize NMS components!"); |
||||
|
compatible = false; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public ParticleHandler(ParticleType type, double speed, int count, double radius) { |
||||
|
this.type = type; |
||||
|
this.speed = speed; |
||||
|
this.count = count; |
||||
|
this.radius = radius; |
||||
|
} |
||||
|
|
||||
|
public double getSpeed() { |
||||
|
return speed; |
||||
|
} |
||||
|
|
||||
|
public int getCount() { |
||||
|
return count; |
||||
|
} |
||||
|
|
||||
|
public double getRadius() { |
||||
|
return radius; |
||||
|
} |
||||
|
|
||||
|
public void sendToLocation(Location location) { |
||||
|
try { |
||||
|
Object packet = createPacket(location); |
||||
|
for (Player player : Bukkit.getOnlinePlayers()) { |
||||
|
sendPacket(player, packet); |
||||
|
} |
||||
|
} catch (Exception e) { |
||||
|
e.printStackTrace(); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
private Object createPacket(Location location) { |
||||
|
try { |
||||
|
if (this.count <= 0) { |
||||
|
this.count = 1; |
||||
|
} |
||||
|
Object packet; |
||||
|
if (newParticlePacketConstructor) { |
||||
|
Object particleType = enumParticle.getEnumConstants()[type.getId()]; |
||||
|
packet = packetConstructor.newInstance(particleType, true, (float) location.getX(), |
||||
|
(float) location.getY(), (float) location.getZ(), (float) this.radius, (float) this.radius, |
||||
|
(float) this.radius, (float) this.speed, this.count); |
||||
|
} else { |
||||
|
Object particleType = enumParticle.getEnumConstants()[type.getId()]; |
||||
|
packet = packetConstructor.newInstance(particleType, true, (float) location.getX(), |
||||
|
(float) location.getY(), (float) location.getZ(), (float) this.radius, (float) this.radius, |
||||
|
(float) this.radius, (float) this.speed, this.count, new int[0]); |
||||
|
} |
||||
|
return packet; |
||||
|
} catch (IllegalAccessException ex) { |
||||
|
ex.printStackTrace(); |
||||
|
Bukkit.getLogger().severe("{ParticleHandler] Failed to construct particle effect packet!"); |
||||
|
} catch (InstantiationException ex) { |
||||
|
ex.printStackTrace(); |
||||
|
Bukkit.getLogger().severe("{ParticleHandler] Failed to construct particle effect packet!"); |
||||
|
} catch (InvocationTargetException ex) { |
||||
|
ex.printStackTrace(); |
||||
|
Bukkit.getLogger().severe("{ParticleHandler] Failed to construct particle effect packet!"); |
||||
|
} |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
private static void sendPacket(Player p, Object packet) throws IllegalArgumentException { |
||||
|
try { |
||||
|
if (player_connection == null) { |
||||
|
player_connection = getHandle(p).getClass().getField("playerConnection"); |
||||
|
for (Method m : player_connection.get(getHandle(p)).getClass().getMethods()) { |
||||
|
if (m.getName().equalsIgnoreCase("sendPacket")) { |
||||
|
player_sendPacket = m; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
player_sendPacket.invoke(player_connection.get(getHandle(p)), packet); |
||||
|
} catch (IllegalAccessException ex) { |
||||
|
ex.printStackTrace(); |
||||
|
Bukkit.getLogger().severe("[ParticleHandler] Failed to send packet!"); |
||||
|
} catch (InvocationTargetException ex) { |
||||
|
ex.printStackTrace(); |
||||
|
Bukkit.getLogger().severe("[ParticleHandler] Failed to send packet!"); |
||||
|
} catch (NoSuchFieldException ex) { |
||||
|
ex.printStackTrace(); |
||||
|
Bukkit.getLogger().severe("[ParticleHandler] Failed to send packet!"); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
private static Object getHandle(Entity entity) { |
||||
|
try { |
||||
|
if (handles.get(entity.getClass()) != null) |
||||
|
return handles.get(entity.getClass()).invoke(entity); |
||||
|
else { |
||||
|
Method entity_getHandle = entity.getClass().getMethod("getHandle"); |
||||
|
handles.put(entity.getClass(), entity_getHandle); |
||||
|
return entity_getHandle.invoke(entity); |
||||
|
} |
||||
|
} catch (Exception ex) { |
||||
|
ex.printStackTrace(); |
||||
|
return null; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
private static Class<?> getNmsClass(String name) { |
||||
|
String version = getVersion(); |
||||
|
String className = "net.minecraft.server." + version + name; |
||||
|
Class<?> clazz = null; |
||||
|
try { |
||||
|
clazz = Class.forName(className); |
||||
|
} catch (ClassNotFoundException ex) { |
||||
|
ex.printStackTrace(); |
||||
|
Bukkit.getLogger().severe("[ParticleHandler] Failed to load NMS class " + name + "!"); |
||||
|
} |
||||
|
return clazz; |
||||
|
} |
||||
|
|
||||
|
private static String getVersion() { |
||||
|
String[] array = Bukkit.getServer().getClass().getPackage().getName().replace(".", ",").split(","); |
||||
|
if (array.length == 4) |
||||
|
return array[3] + "."; |
||||
|
return ""; |
||||
|
} |
||||
|
|
||||
|
public static boolean isCompatible() { |
||||
|
return compatible; |
||||
|
} |
||||
|
|
||||
|
public enum ParticleType { |
||||
|
|
||||
|
EXPLOSION_NORMAL("explode", 0, 17), EXPLOSION_LARGE("largeexplode", 1, 1), |
||||
|
EXPLOSION_HUGE("hugeexplosion", 2, 0), FIREWORKS_SPARK("fireworksSpark", 3, 2), WATER_BUBBLE("bubble", 4, 3), |
||||
|
WATER_SPLASH("splash", 5, 21), WATER_WAKE("wake", 6, -1), SUSPENDED("suspended", 7, 4), |
||||
|
SUSPENDED_DEPTH("depthsuspend", 8, 5), CRIT("crit", 9, 7), CRIT_MAGIC("magicCrit", 10, 8), |
||||
|
SMOKE_NORMAL("smoke", 11, -1), SMOKE_LARGE("largesmoke", 12, 22), SPELL("spell", 13, 11), |
||||
|
SPELL_INSTANT("instantSpell", 14, 12), SPELL_MOB("mobSpell", 15, 9), |
||||
|
SPELL_MOB_AMBIENT("mobSpellAmbient", 16, 10), SPELL_WITCH("witchMagic", 17, 13), |
||||
|
DRIP_WATER("dripWater", 18, 27), DRIP_LAVA("dripLava", 19, 28), VILLAGER_ANGRY("angryVillager", 20, 31), |
||||
|
VILLAGER_HAPPY("happyVillager", 21, 32), TOWN_AURA("townaura", 22, 6), NOTE("note", 23, 24), |
||||
|
PORTAL("portal", 24, 15), ENCHANTMENT_TABLE("enchantmenttable", 25, 16), FLAME("flame", 26, 18), |
||||
|
LAVA("lava", 27, 19), FOOTSTEP("footstep", 28, 20), CLOUD("cloud", 29, 23), REDSTONE("reddust", 30, 24), |
||||
|
SNOWBALL("snowballpoof", 31, 25), SNOW_SHOVEL("snowshovel", 32, 28), SLIME("slime", 33, 29), |
||||
|
HEART("heart", 34, 30), BARRIER("barrier", 35, -1), ITEM_CRACK("iconcrack_", 36, 33), |
||||
|
BLOCK_CRACK("tilecrack_", 37, 34), BLOCK_DUST("blockdust_", 38, -1), WATER_DROP("droplet", 39, -1), |
||||
|
ITEM_TAKE("take", 40, -1), MOB_APPEARANCE("mobappearance", 41, -1); |
||||
|
|
||||
|
private String name; |
||||
|
private int id; |
||||
|
private int legacyId; |
||||
|
|
||||
|
ParticleType(String name, int id, int legacyId) { |
||||
|
this.name = name; |
||||
|
this.id = id; |
||||
|
this.legacyId = legacyId; |
||||
|
} |
||||
|
|
||||
|
String getName() { |
||||
|
return name; |
||||
|
} |
||||
|
|
||||
|
int getId() { |
||||
|
return id; |
||||
|
} |
||||
|
|
||||
|
int getLegacyId() { |
||||
|
return legacyId; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
} |
@ -1,173 +0,0 @@ |
|||||
package cx.sfy.TheBridge.team; |
|
||||
|
|
||||
import java.util.ArrayList; |
|
||||
|
|
||||
import org.bukkit.ChatColor; |
|
||||
import org.bukkit.Color; |
|
||||
import org.bukkit.Location; |
|
||||
import org.bukkit.entity.Player; |
|
||||
|
|
||||
import com.sk89q.worldedit.EditSession; |
|
||||
|
|
||||
import cx.sfy.TheBridge.cosmetics.Cage; |
|
||||
|
|
||||
public abstract class Team { |
|
||||
|
|
||||
private ArrayList<Player> players; |
|
||||
private ArrayList<Location> portal; |
|
||||
private Location hologram; |
|
||||
private Location teamSpawn; |
|
||||
private Location teamRespawn; |
|
||||
private int life; |
|
||||
private boolean death; |
|
||||
private ChatColor color; |
|
||||
private Color fcolor; |
|
||||
private String teamName; |
|
||||
private String ally; |
|
||||
private boolean cage; |
|
||||
private EditSession editSessionRed; |
|
||||
private EditSession editSessionBlue; |
|
||||
private EditSession editSessionYellow; |
|
||||
private EditSession editSessionGreen; |
|
||||
private Cage cages; |
|
||||
|
|
||||
abstract void createCage(Cage cage); |
|
||||
abstract void removeCage(); |
|
||||
|
|
||||
public ArrayList<Player> getPlayers() { |
|
||||
return players; |
|
||||
} |
|
||||
|
|
||||
public void setPlayers(ArrayList<Player> players) { |
|
||||
this.players = players; |
|
||||
} |
|
||||
|
|
||||
public ArrayList<Location> getPortal() { |
|
||||
return portal; |
|
||||
} |
|
||||
|
|
||||
public void setPortal(ArrayList<Location> portal) { |
|
||||
this.portal = portal; |
|
||||
} |
|
||||
|
|
||||
public Location getHologram() { |
|
||||
return hologram; |
|
||||
} |
|
||||
|
|
||||
public void setHologram(Location hologram) { |
|
||||
this.hologram = hologram; |
|
||||
} |
|
||||
|
|
||||
public Location getTeamSpawn() { |
|
||||
return teamSpawn; |
|
||||
} |
|
||||
|
|
||||
public void setTeamSpawn(Location teamSpawn) { |
|
||||
this.teamSpawn = teamSpawn; |
|
||||
} |
|
||||
|
|
||||
public Location getTeamRespawn() { |
|
||||
return teamRespawn; |
|
||||
} |
|
||||
|
|
||||
public void setTeamRespawn(Location teamRespawn) { |
|
||||
this.teamRespawn = teamRespawn; |
|
||||
} |
|
||||
|
|
||||
public int getLife() { |
|
||||
return life; |
|
||||
} |
|
||||
|
|
||||
public void setLife(int life) { |
|
||||
this.life = life; |
|
||||
} |
|
||||
|
|
||||
public boolean isDeath() { |
|
||||
return death; |
|
||||
} |
|
||||
|
|
||||
public void setDeath(boolean death) { |
|
||||
this.death = death; |
|
||||
} |
|
||||
|
|
||||
public ChatColor getColor() { |
|
||||
return color; |
|
||||
} |
|
||||
|
|
||||
public void setColor(ChatColor color) { |
|
||||
this.color = color; |
|
||||
} |
|
||||
|
|
||||
public Color getFcolor() { |
|
||||
return fcolor; |
|
||||
} |
|
||||
|
|
||||
public void setFcolor(Color fcolor) { |
|
||||
this.fcolor = fcolor; |
|
||||
} |
|
||||
|
|
||||
public String getTeamName() { |
|
||||
return teamName; |
|
||||
} |
|
||||
|
|
||||
public void setTeamName(String teamName) { |
|
||||
this.teamName = teamName; |
|
||||
} |
|
||||
|
|
||||
public String getAlly() { |
|
||||
return ally; |
|
||||
} |
|
||||
|
|
||||
public void setAlly(String ally) { |
|
||||
this.ally = ally; |
|
||||
} |
|
||||
|
|
||||
public boolean isCage() { |
|
||||
return cage; |
|
||||
} |
|
||||
|
|
||||
public void setCage(boolean cage) { |
|
||||
this.cage = cage; |
|
||||
} |
|
||||
|
|
||||
public EditSession getEditSessionRed() { |
|
||||
return editSessionRed; |
|
||||
} |
|
||||
|
|
||||
public void setEditSessionRed(EditSession editSessionRed) { |
|
||||
this.editSessionRed = editSessionRed; |
|
||||
} |
|
||||
|
|
||||
public EditSession getEditSessionBlue() { |
|
||||
return editSessionBlue; |
|
||||
} |
|
||||
|
|
||||
public void setEditSessionBlue(EditSession editSessionBlue) { |
|
||||
this.editSessionBlue = editSessionBlue; |
|
||||
} |
|
||||
|
|
||||
public EditSession getEditSessionYellow() { |
|
||||
return editSessionYellow; |
|
||||
} |
|
||||
|
|
||||
public void setEditSessionYellow(EditSession editSessionYellow) { |
|
||||
this.editSessionYellow = editSessionYellow; |
|
||||
} |
|
||||
|
|
||||
public EditSession getEditSessionGreen() { |
|
||||
return editSessionGreen; |
|
||||
} |
|
||||
|
|
||||
public void setEditSessionGreen(EditSession editSessionGreen) { |
|
||||
this.editSessionGreen = editSessionGreen; |
|
||||
} |
|
||||
|
|
||||
public Cage getCages() { |
|
||||
return cages; |
|
||||
} |
|
||||
|
|
||||
public void setCages(Cage cages) { |
|
||||
this.cages = cages; |
|
||||
} |
|
||||
|
|
||||
} |
|
@ -1,32 +0,0 @@ |
|||||
size: 36 |
|
||||
title: '&aThe Bridge - Arrows' |
|
||||
unlocked: |
|
||||
- <description> |
|
||||
- '&7' |
|
||||
- '&eClick to select!' |
|
||||
noPerm: |
|
||||
- <description> |
|
||||
- '&7' |
|
||||
- '&aPrice: &6<price>' |
|
||||
- '&7' |
|
||||
- '&cYou dont have permission!' |
|
||||
locked: |
|
||||
- <description> |
|
||||
- '&7' |
|
||||
- '&aPrice: &6<price>' |
|
||||
- '&7' |
|
||||
- '&eClick to buy this!' |
|
||||
arrows: |
|
||||
default: |
|
||||
icon: ARROW |
|
||||
data: 0 |
|
||||
amount: 1 |
|
||||
slot: 0 |
|
||||
price: 0 |
|
||||
isBuy: true |
|
||||
name: "Default Arrow Effect" |
|
||||
effect: FLAME |
|
||||
permission: bridges.arrow.default |
|
||||
description: |
|
||||
- '&fDefault arrow effect to all' |
|
||||
- '&fplayers' |
|
Loading…
Reference in new issue