added some base classes
idk
This commit is contained in:
@@ -4,6 +4,8 @@ import fantasypvp.kand_smp.commands.CmdLightningSword;
|
||||
import fantasypvp.kand_smp.commands.CmdTeleportSpawn;
|
||||
import fantasypvp.kand_smp.events.Events;
|
||||
import fantasypvp.kand_smp.items.LightningGear;
|
||||
import fantasypvp.kand_smp.items.TrueNetherite;
|
||||
import fantasypvp.kand_smp.items.Witherite;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
public final class Kand_smp extends JavaPlugin {
|
||||
@@ -12,6 +14,8 @@ public final class Kand_smp extends JavaPlugin {
|
||||
public void onEnable() {
|
||||
// Plugin startup logic
|
||||
LightningGear.init();
|
||||
TrueNetherite.init();
|
||||
Witherite.init();
|
||||
// register listeners
|
||||
getServer().getPluginManager().registerEvents(new Events(), this);
|
||||
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
package fantasypvp.kand_smp.events;
|
||||
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import static org.bukkit.Bukkit.getServer;
|
||||
import org.bukkit.event.entity.EntityPotionEffectEvent;
|
||||
import org.bukkit.potion.PotionEffect;
|
||||
|
||||
import static org.bukkit.Bukkit.*;
|
||||
|
||||
public class Events implements Listener {
|
||||
@EventHandler
|
||||
@@ -17,9 +21,37 @@ public class Events implements Listener {
|
||||
if (event.getDamager() instanceof org.bukkit.entity.Player) {
|
||||
Player player = (Player) event.getDamager();
|
||||
// check if the player is using the lightning sword
|
||||
if (player.getInventory().getItemInMainHand().getType() == org.bukkit.Material.NETHERITE_SWORD && player.getInventory().getItemInMainHand().getItemMeta().getDisplayName().equals("Lightning Sword")) {
|
||||
|
||||
if (player.getInventory().getItemInMainHand().getItemMeta().getLore().toString().contains("§7All who oppose shall be smitten")) {
|
||||
player.getWorld().strikeLightning(event.getEntity().getLocation());
|
||||
}
|
||||
|
||||
else if (player.getInventory().getItemInMainHand().getItemMeta().getLore().toString().contains("§f[T5+] Witherite Sword")) {
|
||||
// if affected entity is wearing witherite gear
|
||||
if (event.getEntity() instanceof Player) {
|
||||
Player entity = (Player) event.getEntity();
|
||||
if (entity.getInventory().getHelmet().getItemMeta().getLore().toString().contains("§f[T5+] Witherite Helmet")
|
||||
&& entity.getInventory().getChestplate().getItemMeta().getLore().toString().contains("§f[T5+] Witherite Chestplate")
|
||||
&& entity.getInventory().getLeggings().getItemMeta().getLore().toString().contains("§f[T5+] Witherite Leggings")
|
||||
&& entity.getInventory().getBoots().getItemMeta().getLore().toString().contains("§f[T5+] Witherite Boots")) {
|
||||
;
|
||||
} else {
|
||||
PotionEffect effect = new PotionEffect(
|
||||
org.bukkit.potion.PotionEffectType.WITHER,
|
||||
20 * 5,
|
||||
2
|
||||
);
|
||||
effect.apply((LivingEntity) event.getEntity());
|
||||
}
|
||||
} else {
|
||||
PotionEffect effect = new PotionEffect(
|
||||
org.bukkit.potion.PotionEffectType.WITHER,
|
||||
20 * 5,
|
||||
2
|
||||
);
|
||||
effect.apply((LivingEntity) event.getEntity());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
package fantasypvp.kand_smp.items;
|
||||
|
||||
import fantasypvp.kand_smp.util.attribute_gear.TierV;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.NamespacedKey;
|
||||
import org.bukkit.inventory.*;
|
||||
import org.bukkit.inventory.meta.ItemMeta;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static org.bukkit.Bukkit.getServer;
|
||||
|
||||
public class GearTemplate {
|
||||
public static ItemStack sword;
|
||||
public static ItemStack helmet;
|
||||
public static ItemStack chestplate;
|
||||
public static ItemStack leggings;
|
||||
public static ItemStack boots;
|
||||
|
||||
private static RecipeChoice netherite_upgrade;
|
||||
private static RecipeChoice upgrade_ingredient;
|
||||
|
||||
public static void init() {
|
||||
netherite_upgrade = new RecipeChoice.MaterialChoice(Material.NETHERITE_UPGRADE_SMITHING_TEMPLATE);
|
||||
|
||||
// THIS MUST BE CHANGED
|
||||
upgrade_ingredient = new RecipeChoice.MaterialChoice(Material.BARRIER);
|
||||
|
||||
sword();
|
||||
helmet();
|
||||
chestplate();
|
||||
leggings();
|
||||
boots();
|
||||
}
|
||||
|
||||
private static void sword() {
|
||||
ItemStack item = TierV.sword();
|
||||
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
meta.setDisplayName("§bPLACEHOLDER");
|
||||
List<String> lore = new ArrayList<>();
|
||||
lore.add("§f<PLACEHOLDER>");
|
||||
meta.setLore(lore);
|
||||
item.setItemMeta(meta);
|
||||
sword = item;
|
||||
|
||||
NamespacedKey key = new NamespacedKey("fantasypvp.kand_smp.items", "PLACEHOLDER_SWORD");
|
||||
RecipeChoice sword = new RecipeChoice.MaterialChoice(Material.NETHERITE_SWORD);
|
||||
SmithingTransformRecipe recipe = new SmithingTransformRecipe(key, item, netherite_upgrade, upgrade_ingredient, sword);
|
||||
getServer().addRecipe(recipe);
|
||||
}
|
||||
|
||||
private static void helmet() {
|
||||
ItemStack item = TierV.helmet();
|
||||
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
meta.setDisplayName("§bPLACEHOLDER");
|
||||
item.setItemMeta(meta);
|
||||
helmet = item;
|
||||
|
||||
NamespacedKey key = new NamespacedKey("fantasypvp.kand_smp.items", "PLACEHOLDER_HELMET");
|
||||
RecipeChoice helmet = new RecipeChoice.MaterialChoice(Material.NETHERITE_HELMET);
|
||||
SmithingTransformRecipe recipe = new SmithingTransformRecipe(key, item, netherite_upgrade, upgrade_ingredient, helmet);
|
||||
getServer().addRecipe(recipe);
|
||||
}
|
||||
|
||||
private static void chestplate() {
|
||||
ItemStack item = TierV.chestplate();
|
||||
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
meta.setDisplayName("§bPLACEHOLDER");
|
||||
item.setItemMeta(meta);
|
||||
helmet = item;
|
||||
|
||||
NamespacedKey key = new NamespacedKey("fantasypvp.kand_smp.items", "PLACEHOLDER_CHESTPLATE");
|
||||
RecipeChoice chestplate = new RecipeChoice.MaterialChoice(Material.NETHERITE_CHESTPLATE);
|
||||
SmithingTransformRecipe recipe = new SmithingTransformRecipe(key, item, netherite_upgrade, upgrade_ingredient, chestplate);
|
||||
getServer().addRecipe(recipe);
|
||||
}
|
||||
|
||||
private static void leggings() {
|
||||
ItemStack item = TierV.leggings();
|
||||
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
meta.setDisplayName("§bPLACEHOLDER");
|
||||
item.setItemMeta(meta);
|
||||
helmet = item;
|
||||
|
||||
NamespacedKey key = new NamespacedKey("fantasypvp.kand_smp.items", "PLACEHOLDER_LEGGINGS");
|
||||
RecipeChoice leggings = new RecipeChoice.MaterialChoice(Material.NETHERITE_LEGGINGS);
|
||||
SmithingTransformRecipe recipe = new SmithingTransformRecipe(key, item, netherite_upgrade, upgrade_ingredient, leggings);
|
||||
getServer().addRecipe(recipe);
|
||||
}
|
||||
|
||||
private static void boots() {
|
||||
ItemStack item = TierV.boots();
|
||||
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
meta.setDisplayName("§bPLACEHOLDER");
|
||||
item.setItemMeta(meta);
|
||||
helmet = item;
|
||||
|
||||
NamespacedKey key = new NamespacedKey("fantasypvp.kand_smp.items", "PLACEHOLDER_BOOTS");
|
||||
RecipeChoice boots = new RecipeChoice.MaterialChoice(Material.NETHERITE_BOOTS);
|
||||
SmithingTransformRecipe recipe = new SmithingTransformRecipe(key, item, netherite_upgrade, upgrade_ingredient, boots);
|
||||
getServer().addRecipe(recipe);
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package fantasypvp.kand_smp.items;
|
||||
|
||||
import fantasypvp.kand_smp.util.attribute_gear.TierVI;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.NamespacedKey;
|
||||
import org.bukkit.attribute.Attribute;
|
||||
@@ -9,6 +10,7 @@ import org.bukkit.inventory.meta.ItemMeta;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
import static org.bukkit.Bukkit.getServer;
|
||||
|
||||
@@ -28,19 +30,11 @@ public class TrueNetherite {
|
||||
}
|
||||
|
||||
private static void trueNetheriteSword() {
|
||||
ItemStack item = new ItemStack(Material.NETHERITE_SWORD, 1);
|
||||
ItemStack item = TierVI.sword();
|
||||
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
meta.setDisplayName("§bTrue Netherite Sword");
|
||||
|
||||
meta.addAttributeModifier(
|
||||
org.bukkit.attribute.Attribute.GENERIC_ATTACK_DAMAGE,
|
||||
new AttributeModifier(
|
||||
"generic.attackDamage",
|
||||
10.0,
|
||||
AttributeModifier.Operation.ADD_NUMBER
|
||||
)
|
||||
);
|
||||
|
||||
List<String> lore = new ArrayList<>();
|
||||
lore.add("§fThe true sword of the Nether");
|
||||
meta.setLore(lore);
|
||||
@@ -58,16 +52,20 @@ public class TrueNetherite {
|
||||
}
|
||||
|
||||
private static void trueNetheriteHelmet() {
|
||||
ItemStack item = new ItemStack(Material.NETHERITE_HELMET, 1);
|
||||
ItemStack item = TierVI.helmet();
|
||||
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
meta.setDisplayName("§bTrue Netherite Helmet");
|
||||
|
||||
UUID uuid = UUID.randomUUID();
|
||||
meta.addAttributeModifier(
|
||||
Attribute.GENERIC_MAX_HEALTH,
|
||||
new AttributeModifier(
|
||||
uuid,
|
||||
"generic.maxHealth",
|
||||
5.0,
|
||||
AttributeModifier.Operation.ADD_NUMBER
|
||||
AttributeModifier.Operation.ADD_NUMBER,
|
||||
EquipmentSlot.HEAD
|
||||
)
|
||||
);
|
||||
item.setItemMeta(meta);
|
||||
@@ -83,16 +81,20 @@ public class TrueNetherite {
|
||||
}
|
||||
|
||||
private static void trueNetheriteChestplate() {
|
||||
ItemStack item = new ItemStack(Material.NETHERITE_CHESTPLATE, 1);
|
||||
ItemStack item = TierVI.chestplate();
|
||||
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
meta.setDisplayName("§bTrue Netherite Chestplate");
|
||||
|
||||
UUID uuid = UUID.randomUUID();
|
||||
meta.addAttributeModifier(
|
||||
Attribute.GENERIC_MAX_HEALTH,
|
||||
new AttributeModifier(
|
||||
uuid,
|
||||
"generic.maxHealth",
|
||||
5.0,
|
||||
AttributeModifier.Operation.ADD_NUMBER
|
||||
AttributeModifier.Operation.ADD_NUMBER,
|
||||
EquipmentSlot.CHEST
|
||||
)
|
||||
);
|
||||
item.setItemMeta(meta);
|
||||
@@ -108,16 +110,20 @@ public class TrueNetherite {
|
||||
}
|
||||
|
||||
private static void trueNetheriteLeggings() {
|
||||
ItemStack item = new ItemStack(Material.NETHERITE_LEGGINGS, 1);
|
||||
ItemStack item = TierVI.leggings();
|
||||
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
meta.setDisplayName("§bTrue Netherite Leggings");
|
||||
|
||||
UUID uuid = UUID.randomUUID();
|
||||
meta.addAttributeModifier(
|
||||
Attribute.GENERIC_MAX_HEALTH,
|
||||
new AttributeModifier(
|
||||
uuid,
|
||||
"generic.maxHealth",
|
||||
5.0,
|
||||
AttributeModifier.Operation.ADD_NUMBER
|
||||
AttributeModifier.Operation.ADD_NUMBER,
|
||||
EquipmentSlot.LEGS
|
||||
)
|
||||
);
|
||||
item.setItemMeta(meta);
|
||||
@@ -133,16 +139,20 @@ public class TrueNetherite {
|
||||
}
|
||||
|
||||
private static void trueNetheriteBoots() {
|
||||
ItemStack item = new ItemStack(Material.NETHERITE_BOOTS, 1);
|
||||
ItemStack item = TierVI.boots();
|
||||
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
meta.setDisplayName("§bTrue Netherite Boots");
|
||||
|
||||
UUID uuid = UUID.randomUUID();
|
||||
meta.addAttributeModifier(
|
||||
Attribute.GENERIC_MAX_HEALTH,
|
||||
new AttributeModifier(
|
||||
uuid,
|
||||
"generic.maxHealth",
|
||||
5.0,
|
||||
AttributeModifier.Operation.ADD_NUMBER
|
||||
AttributeModifier.Operation.ADD_NUMBER,
|
||||
EquipmentSlot.FEET
|
||||
)
|
||||
);
|
||||
item.setItemMeta(meta);
|
||||
|
||||
@@ -1,4 +1,120 @@
|
||||
package fantasypvp.kand_smp.items;
|
||||
|
||||
public class Witherite {
|
||||
}
|
||||
import fantasypvp.kand_smp.util.attribute_gear.TierV;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.NamespacedKey;
|
||||
import org.bukkit.inventory.*;
|
||||
import org.bukkit.inventory.meta.ItemMeta;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static org.bukkit.Bukkit.getServer;
|
||||
|
||||
public class Witherite {
|
||||
public static ItemStack sword;
|
||||
public static ItemStack helmet;
|
||||
public static ItemStack chestplate;
|
||||
public static ItemStack leggings;
|
||||
public static ItemStack boots;
|
||||
|
||||
private static RecipeChoice netherite_upgrade;
|
||||
private static RecipeChoice wither_skull;
|
||||
|
||||
public static void init() {
|
||||
netherite_upgrade = new RecipeChoice.MaterialChoice(Material.NETHERITE_UPGRADE_SMITHING_TEMPLATE);
|
||||
wither_skull = new RecipeChoice.MaterialChoice(Material.WITHER_SKELETON_SKULL);
|
||||
|
||||
sword();
|
||||
helmet();
|
||||
chestplate();
|
||||
leggings();
|
||||
boots();
|
||||
}
|
||||
|
||||
private static void sword() {
|
||||
ItemStack item = TierV.sword();
|
||||
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
meta.setDisplayName("§bWitherite Sword");
|
||||
|
||||
List<String> lore = new ArrayList<>();
|
||||
lore.add("§f[T5+] Witherite Sword");
|
||||
meta.setLore(lore);
|
||||
item.setItemMeta(meta);
|
||||
sword = item;
|
||||
|
||||
NamespacedKey key = new NamespacedKey("fantasypvp.kand_smp.items", "witherite_sword");
|
||||
RecipeChoice netherite_sword = new RecipeChoice.MaterialChoice(Material.NETHERITE_SWORD);
|
||||
SmithingTransformRecipe recipe = new SmithingTransformRecipe(key, item, netherite_upgrade, wither_skull, netherite_sword);
|
||||
getServer().addRecipe(recipe);
|
||||
}
|
||||
|
||||
private static void helmet() {
|
||||
ItemStack item = TierV.helmet();
|
||||
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
List<String> lore = new ArrayList<>();
|
||||
lore.add("§f[T5+] Witherite Helmet");
|
||||
meta.setLore(lore);
|
||||
meta.setDisplayName("§bWitherite Helmet");
|
||||
item.setItemMeta(meta);
|
||||
helmet = item;
|
||||
|
||||
NamespacedKey key = new NamespacedKey("fantasypvp.kand_smp.items", "witherite_helmet");
|
||||
RecipeChoice netherite_helmet = new RecipeChoice.MaterialChoice(Material.NETHERITE_HELMET);
|
||||
SmithingTransformRecipe recipe = new SmithingTransformRecipe(key, item, netherite_upgrade, wither_skull, netherite_helmet);
|
||||
getServer().addRecipe(recipe);
|
||||
}
|
||||
|
||||
private static void chestplate() {
|
||||
ItemStack item = TierV.chestplate();
|
||||
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
List<String> lore = new ArrayList<>();
|
||||
lore.add("§f[T5+] Witherite Chestplate");
|
||||
meta.setLore(lore);
|
||||
meta.setDisplayName("§bWitherite Chestplate");
|
||||
item.setItemMeta(meta);
|
||||
helmet = item;
|
||||
|
||||
NamespacedKey key = new NamespacedKey("fantasypvp.kand_smp.items", "witherite_chestplate");
|
||||
RecipeChoice netherite_chestplate = new RecipeChoice.MaterialChoice(Material.NETHERITE_CHESTPLATE);
|
||||
SmithingTransformRecipe recipe = new SmithingTransformRecipe(key, item, netherite_upgrade, wither_skull, netherite_chestplate);
|
||||
getServer().addRecipe(recipe);
|
||||
}
|
||||
|
||||
private static void leggings() {
|
||||
ItemStack item = TierV.leggings();
|
||||
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
List<String> lore = new ArrayList<>();
|
||||
lore.add("§f[T5+] Witherite Leggings");
|
||||
meta.setLore(lore);
|
||||
meta.setDisplayName("§bWitherite Leggings");
|
||||
item.setItemMeta(meta);
|
||||
helmet = item;
|
||||
|
||||
NamespacedKey key = new NamespacedKey("fantasypvp.kand_smp.items", "witherite_leggings");
|
||||
RecipeChoice netherite_leggings = new RecipeChoice.MaterialChoice(Material.NETHERITE_LEGGINGS);
|
||||
SmithingTransformRecipe recipe = new SmithingTransformRecipe(key, item, netherite_upgrade, wither_skull, netherite_leggings);
|
||||
getServer().addRecipe(recipe);
|
||||
}
|
||||
|
||||
private static void boots() {
|
||||
ItemStack item = TierV.boots();
|
||||
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
List<String> lore = new ArrayList<>();
|
||||
lore.add("§f[T5+] Witherite Boots");
|
||||
meta.setLore(lore);
|
||||
meta.setDisplayName("§bWitherite Boots");
|
||||
item.setItemMeta(meta);
|
||||
helmet = item;
|
||||
|
||||
NamespacedKey key = new NamespacedKey("fantasypvp.kand_smp.items", "witherite_boots");
|
||||
RecipeChoice netherite_boots = new RecipeChoice.MaterialChoice(Material.NETHERITE_BOOTS);
|
||||
SmithingTransformRecipe recipe = new SmithingTransformRecipe(key, item, netherite_upgrade, wither_skull, netherite_boots);
|
||||
getServer().addRecipe(recipe);
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,43 @@
|
||||
|
||||
# Gear Tiers:
|
||||
|
||||
## Tier 1:
|
||||
- leather / wood gear
|
||||
- pretty much pointless
|
||||
|
||||
## Tier 2:
|
||||
- stone / chain gear
|
||||
- pretty much pointless
|
||||
|
||||
## Tier 3/3+:
|
||||
- Iron gear & upgrades
|
||||
- Upgrades are equivalent to iron gear in stats however have special abilities that make
|
||||
them a suitable alternative to vanilla diamond armour in some places
|
||||
- Eg:
|
||||
- [T3+] Blazing set: perm fire res, thorns effect deals fire damage, built in fire aspect & flame
|
||||
|
||||
## Tier 4/4+:
|
||||
- Diamond gear & upgrades & equivalents
|
||||
- Upgrades are equivalent to diamond gear in stats however have special abilities that make
|
||||
them a suitable alternative to vanilla netherite armour in some places
|
||||
- Eg:
|
||||
- [T4+] Dragon set: base stats of diamond armour but with built in elytra & dash ability
|
||||
- [T4+] Trader's set: Villager trades are around 20% cheaper & Illagers drop more emeralds on death
|
||||
|
||||
## Tier 5/5+/6:
|
||||
- Netherite gear & upgrades
|
||||
- Upgrades have equal or greater base stats than netherite gear, however may have custom abilties
|
||||
making them a suitable alternative to or upgrade from netherite
|
||||
- Late game sets / will be difficult to obtain
|
||||
- Eg:
|
||||
- [T5+] Witherite set: netherite gear - sword can inflict wither - immunity to wither
|
||||
- [T6] True Netherite: gear set with higher base stats than neatherite & permanent fire res
|
||||
|
||||
|
||||
# Nether Sets / Items:
|
||||
|
||||
## Blazing Halo
|
||||
- crafted with 8 blaze rods in a circle with a
|
||||
- crafted with 8 blaze rods in a circle.
|
||||
|
||||
## True Netherite Set
|
||||
- Netherite gear upgraded with nether stars at a smithing table
|
||||
@@ -19,7 +53,7 @@
|
||||
|
||||
## Blazing Set
|
||||
- upgrade from iron gear
|
||||
- sword can be crafted directly by crafting an iron sword with a blaze rod instead of a stick.
|
||||
- sword can be crafted directly by crafting an iron sword with a blazing halo instead of a stick.
|
||||
- sword and armour can be upgraded using a *Blazing Halo* per piece
|
||||
- provides fire resistance
|
||||
- sword lights enemies on fire (built in fire aspect but with a longer duration)
|
||||
@@ -39,7 +73,6 @@
|
||||
- same protection as diamond gear
|
||||
- dash ability which allows a player to launch into the air without fireworks
|
||||
|
||||
|
||||
# Other
|
||||
|
||||
## Lightning Sword
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
package fantasypvp.kand_smp.util.attribute_gear;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
public abstract class TierBase {
|
||||
public static ItemStack sword() {
|
||||
return new ItemStack(Material.WOODEN_SWORD);
|
||||
}
|
||||
|
||||
public static ItemStack helmet() {
|
||||
return new ItemStack(Material.LEATHER_HELMET);
|
||||
}
|
||||
|
||||
public static ItemStack chestplate() {
|
||||
return new ItemStack(Material.LEATHER_CHESTPLATE);
|
||||
}
|
||||
|
||||
public static ItemStack leggings() {
|
||||
return new ItemStack(Material.LEATHER_LEGGINGS);
|
||||
}
|
||||
|
||||
public static ItemStack boots() {
|
||||
return new ItemStack(Material.LEATHER_BOOTS);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
package fantasypvp.kand_smp.util.attribute_gear;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.attribute.Attribute;
|
||||
import org.bukkit.attribute.AttributeModifier;
|
||||
import org.bukkit.inventory.EquipmentSlot;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.ItemMeta;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public abstract class TierIII extends TierBase {
|
||||
public static ItemStack sword () {
|
||||
ItemStack item = new ItemStack(Material.IRON_SWORD, 1);
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
|
||||
meta.addAttributeModifier(Attribute.GENERIC_ATTACK_DAMAGE, new AttributeModifier(
|
||||
UUID.randomUUID(),
|
||||
"generic.attackDamage",
|
||||
6.0,
|
||||
AttributeModifier.Operation.ADD_NUMBER,
|
||||
EquipmentSlot.HAND
|
||||
));
|
||||
meta.addAttributeModifier(Attribute.GENERIC_ATTACK_SPEED, new AttributeModifier(
|
||||
UUID.randomUUID(),
|
||||
"generic.attackSpeed",
|
||||
-2.4,
|
||||
AttributeModifier.Operation.ADD_NUMBER,
|
||||
EquipmentSlot.HAND
|
||||
));
|
||||
item.setItemMeta(meta);
|
||||
return item;
|
||||
}
|
||||
|
||||
public static ItemStack helmet () {
|
||||
ItemStack item = new ItemStack(Material.IRON_HELMET, 1);
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
meta.addAttributeModifier(Attribute.GENERIC_ARMOR, new AttributeModifier(
|
||||
UUID.randomUUID(),
|
||||
"generic.armor",
|
||||
2.0,
|
||||
AttributeModifier.Operation.ADD_NUMBER,
|
||||
EquipmentSlot.HEAD
|
||||
));
|
||||
item.setItemMeta(meta);
|
||||
return item;
|
||||
}
|
||||
|
||||
public static ItemStack chestplate () {
|
||||
ItemStack item = new ItemStack(Material.IRON_CHESTPLATE, 1);
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
meta.addAttributeModifier(Attribute.GENERIC_ARMOR, new AttributeModifier(
|
||||
UUID.randomUUID(),
|
||||
"generic.armor",
|
||||
6.0,
|
||||
AttributeModifier.Operation.ADD_NUMBER,
|
||||
EquipmentSlot.CHEST
|
||||
));
|
||||
item.setItemMeta(meta);
|
||||
return item;
|
||||
}
|
||||
|
||||
public static ItemStack leggings () {
|
||||
ItemStack item = new ItemStack(Material.IRON_LEGGINGS, 1);
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
meta.addAttributeModifier(Attribute.GENERIC_ARMOR, new AttributeModifier(
|
||||
UUID.randomUUID(),
|
||||
"generic.armor",
|
||||
5.0,
|
||||
AttributeModifier.Operation.ADD_NUMBER,
|
||||
EquipmentSlot.LEGS
|
||||
));
|
||||
item.setItemMeta(meta);
|
||||
return item;
|
||||
}
|
||||
|
||||
public static ItemStack boots () {
|
||||
ItemStack item = new ItemStack(Material.IRON_BOOTS, 1);
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
meta.addAttributeModifier(Attribute.GENERIC_ARMOR, new AttributeModifier(
|
||||
UUID.randomUUID(),
|
||||
"generic.armor",
|
||||
2.0,
|
||||
AttributeModifier.Operation.ADD_NUMBER,
|
||||
EquipmentSlot.FEET
|
||||
));
|
||||
item.setItemMeta(meta);
|
||||
return item;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,118 @@
|
||||
package fantasypvp.kand_smp.util.attribute_gear;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.attribute.Attribute;
|
||||
import org.bukkit.attribute.AttributeModifier;
|
||||
import org.bukkit.inventory.EquipmentSlot;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.ItemMeta;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public abstract class TierIV extends TierBase {
|
||||
public static ItemStack sword () {
|
||||
ItemStack item = new ItemStack(Material.DIAMOND_SWORD, 1);
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
|
||||
meta.addAttributeModifier(Attribute.GENERIC_ATTACK_DAMAGE, new AttributeModifier(
|
||||
UUID.randomUUID(),
|
||||
"generic.attackDamage",
|
||||
7.0,
|
||||
AttributeModifier.Operation.ADD_NUMBER,
|
||||
EquipmentSlot.HAND
|
||||
));
|
||||
meta.addAttributeModifier(Attribute.GENERIC_ATTACK_SPEED, new AttributeModifier(
|
||||
UUID.randomUUID(),
|
||||
"generic.attackSpeed",
|
||||
-2.4,
|
||||
AttributeModifier.Operation.ADD_NUMBER,
|
||||
EquipmentSlot.HAND
|
||||
));
|
||||
item.setItemMeta(meta);
|
||||
return item;
|
||||
}
|
||||
|
||||
public static ItemStack helmet () {
|
||||
ItemStack item = new ItemStack(Material.DIAMOND_HELMET, 1);
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
meta.addAttributeModifier(Attribute.GENERIC_ARMOR, new AttributeModifier(
|
||||
UUID.randomUUID(),
|
||||
"generic.armor",
|
||||
3.0,
|
||||
AttributeModifier.Operation.ADD_NUMBER,
|
||||
EquipmentSlot.HEAD
|
||||
));
|
||||
meta.addAttributeModifier(Attribute.GENERIC_ARMOR_TOUGHNESS, new AttributeModifier(
|
||||
UUID.randomUUID(),
|
||||
"generic.armorToughness",
|
||||
2.0,
|
||||
AttributeModifier.Operation.ADD_NUMBER,
|
||||
EquipmentSlot.HEAD
|
||||
));
|
||||
item.setItemMeta(meta);
|
||||
return item;
|
||||
}
|
||||
|
||||
public static ItemStack chestplate () {
|
||||
ItemStack item = new ItemStack(Material.DIAMOND_CHESTPLATE, 1);
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
meta.addAttributeModifier(Attribute.GENERIC_ARMOR, new AttributeModifier(
|
||||
UUID.randomUUID(),
|
||||
"generic.armor",
|
||||
8.0,
|
||||
AttributeModifier.Operation.ADD_NUMBER,
|
||||
EquipmentSlot.CHEST
|
||||
));
|
||||
meta.addAttributeModifier(Attribute.GENERIC_ARMOR_TOUGHNESS, new AttributeModifier(
|
||||
UUID.randomUUID(),
|
||||
"generic.armorToughness",
|
||||
2.0,
|
||||
AttributeModifier.Operation.ADD_NUMBER,
|
||||
EquipmentSlot.CHEST
|
||||
));
|
||||
item.setItemMeta(meta);
|
||||
return item;
|
||||
}
|
||||
|
||||
public static ItemStack leggings () {
|
||||
ItemStack item = new ItemStack(Material.DIAMOND_LEGGINGS, 1);
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
meta.addAttributeModifier(Attribute.GENERIC_ARMOR, new AttributeModifier(
|
||||
UUID.randomUUID(),
|
||||
"generic.armor",
|
||||
6.0,
|
||||
AttributeModifier.Operation.ADD_NUMBER,
|
||||
EquipmentSlot.LEGS
|
||||
));
|
||||
meta.addAttributeModifier(Attribute.GENERIC_ARMOR_TOUGHNESS, new AttributeModifier(
|
||||
UUID.randomUUID(),
|
||||
"generic.armorToughness",
|
||||
2.0,
|
||||
AttributeModifier.Operation.ADD_NUMBER,
|
||||
EquipmentSlot.LEGS
|
||||
));
|
||||
item.setItemMeta(meta);
|
||||
return item;
|
||||
}
|
||||
|
||||
public static ItemStack boots () {
|
||||
ItemStack item = new ItemStack(Material.DIAMOND_BOOTS, 1);
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
meta.addAttributeModifier(Attribute.GENERIC_ARMOR, new AttributeModifier(
|
||||
UUID.randomUUID(),
|
||||
"generic.armor",
|
||||
3.0,
|
||||
AttributeModifier.Operation.ADD_NUMBER,
|
||||
EquipmentSlot.FEET
|
||||
));
|
||||
meta.addAttributeModifier(Attribute.GENERIC_ARMOR_TOUGHNESS, new AttributeModifier(
|
||||
UUID.randomUUID(),
|
||||
"generic.armorToughness",
|
||||
2.0,
|
||||
AttributeModifier.Operation.ADD_NUMBER,
|
||||
EquipmentSlot.FEET
|
||||
));
|
||||
item.setItemMeta(meta);
|
||||
return item;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,147 @@
|
||||
package fantasypvp.kand_smp.util.attribute_gear;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.attribute.Attribute;
|
||||
import org.bukkit.attribute.AttributeModifier;
|
||||
import org.bukkit.inventory.EquipmentSlot;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.ItemMeta;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
||||
public abstract class TierV extends TierBase {
|
||||
public static ItemStack sword () {
|
||||
ItemStack item = new ItemStack(Material.NETHERITE_SWORD, 1);
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
|
||||
meta.addAttributeModifier(Attribute.GENERIC_ATTACK_DAMAGE, new AttributeModifier(
|
||||
UUID.randomUUID(),
|
||||
"generic.attackDamage",
|
||||
8.0,
|
||||
AttributeModifier.Operation.ADD_NUMBER,
|
||||
EquipmentSlot.HAND
|
||||
));
|
||||
meta.addAttributeModifier(Attribute.GENERIC_ATTACK_SPEED, new AttributeModifier(
|
||||
UUID.randomUUID(),
|
||||
"generic.attackSpeed",
|
||||
-2.4,
|
||||
AttributeModifier.Operation.ADD_NUMBER,
|
||||
EquipmentSlot.HAND
|
||||
));
|
||||
item.setItemMeta(meta);
|
||||
return item;
|
||||
}
|
||||
|
||||
public static ItemStack helmet () {
|
||||
ItemStack item = new ItemStack(Material.NETHERITE_HELMET, 1);
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
meta.addAttributeModifier(Attribute.GENERIC_ARMOR, new AttributeModifier(
|
||||
UUID.randomUUID(),
|
||||
"generic.armor",
|
||||
3.0,
|
||||
AttributeModifier.Operation.ADD_NUMBER,
|
||||
EquipmentSlot.HEAD
|
||||
));
|
||||
meta.addAttributeModifier(Attribute.GENERIC_ARMOR_TOUGHNESS, new AttributeModifier(
|
||||
UUID.randomUUID(),
|
||||
"generic.armorToughness",
|
||||
3.0,
|
||||
AttributeModifier.Operation.ADD_NUMBER,
|
||||
EquipmentSlot.HEAD
|
||||
));
|
||||
meta.addAttributeModifier(Attribute.GENERIC_KNOCKBACK_RESISTANCE, new AttributeModifier(
|
||||
UUID.randomUUID(),
|
||||
"generic.knockbackResistance",
|
||||
0.1,
|
||||
AttributeModifier.Operation.ADD_NUMBER,
|
||||
EquipmentSlot.HEAD
|
||||
));
|
||||
item.setItemMeta(meta);
|
||||
return item;
|
||||
}
|
||||
|
||||
public static ItemStack chestplate () {
|
||||
ItemStack item = new ItemStack(Material.NETHERITE_CHESTPLATE, 1);
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
meta.addAttributeModifier(Attribute.GENERIC_ARMOR, new AttributeModifier(
|
||||
UUID.randomUUID(),
|
||||
"generic.armor",
|
||||
8.0,
|
||||
AttributeModifier.Operation.ADD_NUMBER,
|
||||
EquipmentSlot.CHEST
|
||||
));
|
||||
meta.addAttributeModifier(Attribute.GENERIC_ARMOR_TOUGHNESS, new AttributeModifier(
|
||||
UUID.randomUUID(),
|
||||
"generic.armorToughness",
|
||||
3.0,
|
||||
AttributeModifier.Operation.ADD_NUMBER,
|
||||
EquipmentSlot.CHEST
|
||||
));
|
||||
meta.addAttributeModifier(Attribute.GENERIC_KNOCKBACK_RESISTANCE, new AttributeModifier(
|
||||
UUID.randomUUID(),
|
||||
"generic.knockbackResistance",
|
||||
0.1,
|
||||
AttributeModifier.Operation.ADD_NUMBER,
|
||||
EquipmentSlot.CHEST
|
||||
));
|
||||
item.setItemMeta(meta);
|
||||
return item;
|
||||
}
|
||||
|
||||
public static ItemStack leggings () {
|
||||
ItemStack item = new ItemStack(Material.NETHERITE_LEGGINGS, 1);
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
meta.addAttributeModifier(Attribute.GENERIC_ARMOR, new AttributeModifier(
|
||||
UUID.randomUUID(),
|
||||
"generic.armor",
|
||||
6.0,
|
||||
AttributeModifier.Operation.ADD_NUMBER,
|
||||
EquipmentSlot.LEGS
|
||||
));
|
||||
meta.addAttributeModifier(Attribute.GENERIC_ARMOR_TOUGHNESS, new AttributeModifier(
|
||||
UUID.randomUUID(),
|
||||
"generic.armorToughness",
|
||||
3.0,
|
||||
AttributeModifier.Operation.ADD_NUMBER,
|
||||
EquipmentSlot.LEGS
|
||||
));
|
||||
meta.addAttributeModifier(Attribute.GENERIC_KNOCKBACK_RESISTANCE, new AttributeModifier(
|
||||
UUID.randomUUID(),
|
||||
"generic.knockbackResistance",
|
||||
0.1,
|
||||
AttributeModifier.Operation.ADD_NUMBER,
|
||||
EquipmentSlot.LEGS
|
||||
));
|
||||
item.setItemMeta(meta);
|
||||
return item;
|
||||
}
|
||||
|
||||
public static ItemStack boots () {
|
||||
ItemStack item = new ItemStack(Material.NETHERITE_BOOTS, 1);
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
meta.addAttributeModifier(Attribute.GENERIC_ARMOR, new AttributeModifier(
|
||||
UUID.randomUUID(),
|
||||
"generic.armor",
|
||||
3.0,
|
||||
AttributeModifier.Operation.ADD_NUMBER,
|
||||
EquipmentSlot.FEET
|
||||
));
|
||||
meta.addAttributeModifier(Attribute.GENERIC_ARMOR_TOUGHNESS, new AttributeModifier(
|
||||
UUID.randomUUID(),
|
||||
"generic.armorToughness",
|
||||
3.0,
|
||||
AttributeModifier.Operation.ADD_NUMBER,
|
||||
EquipmentSlot.FEET
|
||||
));
|
||||
meta.addAttributeModifier(Attribute.GENERIC_KNOCKBACK_RESISTANCE, new AttributeModifier(
|
||||
UUID.randomUUID(),
|
||||
"generic.knockbackResistance",
|
||||
0.1,
|
||||
AttributeModifier.Operation.ADD_NUMBER,
|
||||
EquipmentSlot.FEET
|
||||
));
|
||||
item.setItemMeta(meta);
|
||||
return item;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,147 @@
|
||||
package fantasypvp.kand_smp.util.attribute_gear;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.attribute.Attribute;
|
||||
import org.bukkit.attribute.AttributeModifier;
|
||||
import org.bukkit.inventory.EquipmentSlot;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.ItemMeta;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
||||
public abstract class TierVI extends TierBase {
|
||||
public static ItemStack sword () {
|
||||
ItemStack item = new ItemStack(Material.NETHERITE_SWORD, 1);
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
|
||||
meta.addAttributeModifier(Attribute.GENERIC_ATTACK_DAMAGE, new AttributeModifier(
|
||||
UUID.randomUUID(),
|
||||
"generic.attackDamage",
|
||||
9.5,
|
||||
AttributeModifier.Operation.ADD_NUMBER,
|
||||
EquipmentSlot.HAND
|
||||
));
|
||||
meta.addAttributeModifier(Attribute.GENERIC_ATTACK_SPEED, new AttributeModifier(
|
||||
UUID.randomUUID(),
|
||||
"generic.attackSpeed",
|
||||
-2.4,
|
||||
AttributeModifier.Operation.ADD_NUMBER,
|
||||
EquipmentSlot.HAND
|
||||
));
|
||||
item.setItemMeta(meta);
|
||||
return item;
|
||||
}
|
||||
|
||||
public static ItemStack helmet () {
|
||||
ItemStack item = new ItemStack(Material.NETHERITE_HELMET, 1);
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
meta.addAttributeModifier(Attribute.GENERIC_ARMOR, new AttributeModifier(
|
||||
UUID.randomUUID(),
|
||||
"generic.armor",
|
||||
3.0,
|
||||
AttributeModifier.Operation.ADD_NUMBER,
|
||||
EquipmentSlot.HEAD
|
||||
));
|
||||
meta.addAttributeModifier(Attribute.GENERIC_ARMOR_TOUGHNESS, new AttributeModifier(
|
||||
UUID.randomUUID(),
|
||||
"generic.armorToughness",
|
||||
5.0,
|
||||
AttributeModifier.Operation.ADD_NUMBER,
|
||||
EquipmentSlot.HEAD
|
||||
));
|
||||
meta.addAttributeModifier(Attribute.GENERIC_KNOCKBACK_RESISTANCE, new AttributeModifier(
|
||||
UUID.randomUUID(),
|
||||
"generic.knockbackResistance",
|
||||
0.1,
|
||||
AttributeModifier.Operation.ADD_NUMBER,
|
||||
EquipmentSlot.HEAD
|
||||
));
|
||||
item.setItemMeta(meta);
|
||||
return item;
|
||||
}
|
||||
|
||||
public static ItemStack chestplate () {
|
||||
ItemStack item = new ItemStack(Material.NETHERITE_CHESTPLATE, 1);
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
meta.addAttributeModifier(Attribute.GENERIC_ARMOR, new AttributeModifier(
|
||||
UUID.randomUUID(),
|
||||
"generic.armor",
|
||||
8.0,
|
||||
AttributeModifier.Operation.ADD_NUMBER,
|
||||
EquipmentSlot.CHEST
|
||||
));
|
||||
meta.addAttributeModifier(Attribute.GENERIC_ARMOR_TOUGHNESS, new AttributeModifier(
|
||||
UUID.randomUUID(),
|
||||
"generic.armorToughness",
|
||||
5.0,
|
||||
AttributeModifier.Operation.ADD_NUMBER,
|
||||
EquipmentSlot.CHEST
|
||||
));
|
||||
meta.addAttributeModifier(Attribute.GENERIC_KNOCKBACK_RESISTANCE, new AttributeModifier(
|
||||
UUID.randomUUID(),
|
||||
"generic.knockbackResistance",
|
||||
0.1,
|
||||
AttributeModifier.Operation.ADD_NUMBER,
|
||||
EquipmentSlot.CHEST
|
||||
));
|
||||
item.setItemMeta(meta);
|
||||
return item;
|
||||
}
|
||||
|
||||
public static ItemStack leggings () {
|
||||
ItemStack item = new ItemStack(Material.NETHERITE_LEGGINGS, 1);
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
meta.addAttributeModifier(Attribute.GENERIC_ARMOR, new AttributeModifier(
|
||||
UUID.randomUUID(),
|
||||
"generic.armor",
|
||||
6.0,
|
||||
AttributeModifier.Operation.ADD_NUMBER,
|
||||
EquipmentSlot.LEGS
|
||||
));
|
||||
meta.addAttributeModifier(Attribute.GENERIC_ARMOR_TOUGHNESS, new AttributeModifier(
|
||||
UUID.randomUUID(),
|
||||
"generic.armorToughness",
|
||||
5.0,
|
||||
AttributeModifier.Operation.ADD_NUMBER,
|
||||
EquipmentSlot.LEGS
|
||||
));
|
||||
meta.addAttributeModifier(Attribute.GENERIC_KNOCKBACK_RESISTANCE, new AttributeModifier(
|
||||
UUID.randomUUID(),
|
||||
"generic.knockbackResistance",
|
||||
0.1,
|
||||
AttributeModifier.Operation.ADD_NUMBER,
|
||||
EquipmentSlot.LEGS
|
||||
));
|
||||
item.setItemMeta(meta);
|
||||
return item;
|
||||
}
|
||||
|
||||
public static ItemStack boots () {
|
||||
ItemStack item = new ItemStack(Material.NETHERITE_BOOTS, 1);
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
meta.addAttributeModifier(Attribute.GENERIC_ARMOR, new AttributeModifier(
|
||||
UUID.randomUUID(),
|
||||
"generic.armor",
|
||||
3.0,
|
||||
AttributeModifier.Operation.ADD_NUMBER,
|
||||
EquipmentSlot.FEET
|
||||
));
|
||||
meta.addAttributeModifier(Attribute.GENERIC_ARMOR_TOUGHNESS, new AttributeModifier(
|
||||
UUID.randomUUID(),
|
||||
"generic.armorToughness",
|
||||
5.0,
|
||||
AttributeModifier.Operation.ADD_NUMBER,
|
||||
EquipmentSlot.FEET
|
||||
));
|
||||
meta.addAttributeModifier(Attribute.GENERIC_KNOCKBACK_RESISTANCE, new AttributeModifier(
|
||||
UUID.randomUUID(),
|
||||
"generic.knockbackResistance",
|
||||
0.1,
|
||||
AttributeModifier.Operation.ADD_NUMBER,
|
||||
EquipmentSlot.FEET
|
||||
));
|
||||
item.setItemMeta(meta);
|
||||
return item;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user