Miner level 20 buff moved to right click, debug equipment repository
added (/event cheat). Currently a bug where taking damage reduces health to zero and glitches player, not sure of cause.
This commit is contained in:
parent
d775a20155
commit
eb6816277e
@ -22,6 +22,7 @@ import net.milkbowl.vault.economy.EconomyResponse;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.Chunk;
|
import org.bukkit.Chunk;
|
||||||
@ -158,6 +159,7 @@ import org.bukkit.event.player.PlayerShearEntityEvent;
|
|||||||
import org.bukkit.event.player.PlayerTeleportEvent;
|
import org.bukkit.event.player.PlayerTeleportEvent;
|
||||||
import org.bukkit.event.player.PlayerToggleFlightEvent;
|
import org.bukkit.event.player.PlayerToggleFlightEvent;
|
||||||
import org.bukkit.event.player.PlayerToggleSneakEvent;
|
import org.bukkit.event.player.PlayerToggleSneakEvent;
|
||||||
|
import org.bukkit.event.player.PlayerToggleSprintEvent;
|
||||||
import org.bukkit.event.server.ServerListPingEvent;
|
import org.bukkit.event.server.ServerListPingEvent;
|
||||||
import org.bukkit.event.vehicle.VehicleEnterEvent;
|
import org.bukkit.event.vehicle.VehicleEnterEvent;
|
||||||
import org.bukkit.event.vehicle.VehicleExitEvent;
|
import org.bukkit.event.vehicle.VehicleExitEvent;
|
||||||
@ -1429,12 +1431,20 @@ implements Listener
|
|||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPlayerSneak(PlayerToggleSneakEvent e) {
|
public void onPlayerSneak(PlayerToggleSneakEvent e) {
|
||||||
if (e.isSneaking()) {
|
|
||||||
if (this.plugin.hasJobBuff("Hunter", e.getPlayer(), Job.JOB10)) {
|
|
||||||
e.getPlayer().addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 9999999, 0, true));
|
|
||||||
if (Main.SERVER_TICK_TIME-this.plugin.getPlayerData(e.getPlayer()).lastsneaktime>60) {
|
|
||||||
this.plugin.getPlayerData(e.getPlayer()).lastsneaktime=Main.SERVER_TICK_TIME;
|
|
||||||
Player p = e.getPlayer();
|
Player p = e.getPlayer();
|
||||||
|
if (e.isSneaking()) {
|
||||||
|
if (p.getInventory().getBoots() != null && p.getInventory().getBoots().hasItemMeta() && p.getInventory().getBoots().getItemMeta().getLore() != null) { // Screw null pointer exceptions
|
||||||
|
for(String s : p.getInventory().getBoots().getItemMeta().getLore()) {
|
||||||
|
// Check for hyper jump modifier (admins). If it exists, give Jump Boost X to player.
|
||||||
|
if (s.contains(ChatColor.AQUA+"Hyper jump")) {
|
||||||
|
p.addPotionEffect(new PotionEffect(PotionEffectType.JUMP, 200, 10));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (this.plugin.hasJobBuff("Hunter", p, Job.JOB10)) {
|
||||||
|
p.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 9999999, 0, true));
|
||||||
|
if (Main.SERVER_TICK_TIME-this.plugin.getPlayerData(p).lastsneaktime>60) {
|
||||||
|
this.plugin.getPlayerData(p).lastsneaktime=Main.SERVER_TICK_TIME;
|
||||||
List<Entity> nearby = p.getNearbyEntities(20, 12, 20);
|
List<Entity> nearby = p.getNearbyEntities(20, 12, 20);
|
||||||
//List<Entity> nearby2 = p.getNearbyEntities(10, 6, 10);
|
//List<Entity> nearby2 = p.getNearbyEntities(10, 6, 10);
|
||||||
for (int i=0;i<nearby.size();i++) {
|
for (int i=0;i<nearby.size();i++) {
|
||||||
@ -1452,14 +1462,14 @@ implements Listener
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (this.plugin.hasJobBuff("Hunter", e.getPlayer(), Job.JOB10)) {
|
if (this.plugin.hasJobBuff("Hunter", p, Job.JOB10)) {
|
||||||
if (e.getPlayer().hasPotionEffect(PotionEffectType.INVISIBILITY)) {
|
if (p.hasPotionEffect(PotionEffectType.INVISIBILITY)) {
|
||||||
try {
|
try {
|
||||||
Collection<PotionEffect> effects = e.getPlayer().getActivePotionEffects();
|
Collection<PotionEffect> effects = p.getActivePotionEffects();
|
||||||
for (PotionEffect nextpotioneffect : effects) {
|
for (PotionEffect nextpotioneffect : effects) {
|
||||||
if (nextpotioneffect.getType().getName().compareTo("INVISIBILITY")==0 && nextpotioneffect.getDuration()>24000) {
|
if (nextpotioneffect.getType().getName().compareTo("INVISIBILITY")==0 && nextpotioneffect.getDuration()>24000) {
|
||||||
//This is definitely not a potion given to you.
|
//This is definitely not a potion given to you.
|
||||||
e.getPlayer().removePotionEffect(PotionEffectType.INVISIBILITY);
|
p.removePotionEffect(PotionEffectType.INVISIBILITY);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3856,12 +3866,7 @@ implements Listener
|
|||||||
//p.sendMessage("Has name: "+p.getItemInHand().getItemMeta().hasDisplayName());
|
//p.sendMessage("Has name: "+p.getItemInHand().getItemMeta().hasDisplayName());
|
||||||
//p.sendMessage("Name is: "+p.getItemInHand().getItemMeta().getDisplayName());
|
//p.sendMessage("Name is: "+p.getItemInHand().getItemMeta().getDisplayName());
|
||||||
int myData=this.plugin.getPlayerDataSlot(p);
|
int myData=this.plugin.getPlayerDataSlot(p);
|
||||||
boolean has_silktouch=false;
|
boolean has_silktouch=p.getItemInHand().containsEnchantment(Enchantment.SILK_TOUCH);
|
||||||
if (!p.getItemInHand().containsEnchantment(Enchantment.SILK_TOUCH)) {
|
|
||||||
has_silktouch=false;
|
|
||||||
} else {
|
|
||||||
has_silktouch=true;
|
|
||||||
}
|
|
||||||
|
|
||||||
//*******************************//Job Buffs Begin here!
|
//*******************************//Job Buffs Begin here!
|
||||||
if (this.plugin.hasJobBuff("Builder", p, Job.JOB40) && p.getAllowFlight()) {
|
if (this.plugin.hasJobBuff("Builder", p, Job.JOB40) && p.getAllowFlight()) {
|
||||||
@ -3985,7 +3990,8 @@ implements Listener
|
|||||||
p.addPotionEffect(new PotionEffect(PotionEffectType.FAST_DIGGING, 200, 0, true));
|
p.addPotionEffect(new PotionEffect(PotionEffectType.FAST_DIGGING, 200, 0, true));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.plugin.hasJobBuff("Miner", p, Job.JOB20)) {
|
|
||||||
|
if (this.plugin.hasJobBuff("Miner", p, Job.JOB20) && false) { // Disabled atm
|
||||||
if (p.getItemInHand().getType()==Material.DIAMOND_PICKAXE && (e.getBlock().getType()==Material.STONE || e.getBlock().getType()==Material.COBBLESTONE)) {
|
if (p.getItemInHand().getType()==Material.DIAMOND_PICKAXE && (e.getBlock().getType()==Material.STONE || e.getBlock().getType()==Material.COBBLESTONE)) {
|
||||||
for (int i=-1;i<2;i++) {
|
for (int i=-1;i<2;i++) {
|
||||||
for (int j=-1;j<2;j++) {
|
for (int j=-1;j<2;j++) {
|
||||||
@ -4002,11 +4008,14 @@ implements Listener
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (e.getBlock().getLocation().add(i,j,k).getBlock().getType()==Material.STONE || e.getBlock().getLocation().add(i,j,k).getBlock().getType()==Material.COBBLESTONE) {
|
if (e.getBlock().getLocation().add(i,j,k).getBlock().getType()==Material.STONE || e.getBlock().getLocation().add(i,j,k).getBlock().getType()==Material.COBBLESTONE) {
|
||||||
|
|
||||||
if (has_silktouch) {
|
if (has_silktouch) {
|
||||||
e.getBlock().getWorld().dropItemNaturally(e.getBlock().getLocation().add(i,j,k), new ItemStack(e.getBlock().getLocation().add(i,j,k).getBlock().getType()));
|
e.getBlock().getWorld().dropItemNaturally(e.getBlock().getLocation().add(i,j,k), new ItemStack(e.getBlock().getLocation().add(i,j,k).getBlock().getType()));
|
||||||
} else {
|
} else {
|
||||||
e.getBlock().getWorld().dropItemNaturally(e.getBlock().getLocation().add(i,j,k), new ItemStack(Material.COBBLESTONE));
|
e.getBlock().getWorld().dropItemNaturally(e.getBlock().getLocation().add(i,j,k), new ItemStack(Material.COBBLESTONE));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
e.getBlock().breakNaturally(p.getItemInHand());
|
||||||
e.getBlock().getLocation().add(i,j,k).getBlock().setType(Material.AIR);
|
e.getBlock().getLocation().add(i,j,k).getBlock().setType(Material.AIR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -8101,8 +8110,18 @@ implements Listener
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (p.getInventory().getHelmet() != null && p.getInventory().getHelmet().hasItemMeta() && p.getInventory().getHelmet().getItemMeta().getLore() != null) { // Screw null pointer exceptions
|
||||||
|
for(String s : p.getInventory().getHelmet().getItemMeta().getLore()) {
|
||||||
|
// Check for food replenish.
|
||||||
|
if (s.contains(ChatColor.AQUA+"Food replenish")) {
|
||||||
|
e.setFoodLevel(20);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onBucketEmpty(PlayerBucketEmptyEvent e) {
|
public void onBucketEmpty(PlayerBucketEmptyEvent e) {
|
||||||
@ -8864,18 +8883,29 @@ implements Listener
|
|||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPlayerOnFire(EntityCombustEvent e) {
|
public void onPlayerOnFire(EntityCombustEvent e) {
|
||||||
if (e.getEntity() instanceof LivingEntity) {
|
boolean fireResist = false;
|
||||||
if (!((LivingEntity)(e.getEntity())).hasPotionEffect(PotionEffectType.FIRE_RESISTANCE)) {
|
|
||||||
doFireAspectDamage(((LivingEntity)e.getEntity()), this.plugin);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (e.getEntity().getType()==EntityType.PLAYER) {
|
if (e.getEntity().getType()==EntityType.PLAYER) {
|
||||||
Player p = (Player)e.getEntity();
|
Player p = (Player)e.getEntity();
|
||||||
if (this.plugin.getAccountsConfig().getInt(p.getName().toLowerCase()+".stats.stat6")>0) {
|
if (this.plugin.getAccountsConfig().getInt(p.getName().toLowerCase()+".stats.stat6")>0) {
|
||||||
p.addPotionEffect(new PotionEffect(PotionEffectType.FIRE_RESISTANCE, (this.plugin.getStatBonus(5, this.plugin.getAccountsConfig().getInt(p.getName().toLowerCase()+".stats.stat6"))/3)*20, 0));
|
p.addPotionEffect(new PotionEffect(PotionEffectType.FIRE_RESISTANCE, (this.plugin.getStatBonus(5, this.plugin.getAccountsConfig().getInt(p.getName().toLowerCase()+".stats.stat6"))/3)*20, 0));
|
||||||
}
|
}
|
||||||
|
if (p.getInventory().getChestplate() != null && p.getInventory().getChestplate().hasItemMeta() && p.getInventory().getChestplate().getItemMeta().getLore() != null) { // Screw null pointer exceptions
|
||||||
|
for(String s : p.getInventory().getChestplate().getItemMeta().getLore()) {
|
||||||
|
// Check for fire resist
|
||||||
|
if (s.contains(ChatColor.AQUA+"Fire resistance")) {
|
||||||
|
e.setCancelled(true);
|
||||||
|
fireResist = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (e.getEntity() instanceof LivingEntity && !fireResist) {
|
||||||
|
if (!((LivingEntity)(e.getEntity())).hasPotionEffect(PotionEffectType.FIRE_RESISTANCE)) {
|
||||||
|
doFireAspectDamage(((LivingEntity)e.getEntity()), this.plugin);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onRegainHealth(EntityRegainHealthEvent e) {
|
public void onRegainHealth(EntityRegainHealthEvent e) {
|
||||||
@ -11514,6 +11544,23 @@ implements Listener
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void onSprintToggle(PlayerToggleSprintEvent event) {
|
||||||
|
Player p = event.getPlayer();
|
||||||
|
|
||||||
|
if (p.getInventory().getLeggings() != null && p.getInventory().getLeggings().hasItemMeta() && p.getInventory().getLeggings().getItemMeta().getLore() != null) { // Screw null pointer exceptions
|
||||||
|
for(String s : p.getInventory().getLeggings().getItemMeta().getLore()) {
|
||||||
|
// Check for hyper sprint modifier (admins). If it exists, give Speed V to player.
|
||||||
|
if (s.contains(ChatColor.AQUA+"Hyper sprint")) {
|
||||||
|
if (event.isSprinting()) {
|
||||||
|
p.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, 200, 10));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onInventoryClickEvent(InventoryClickEvent event) {
|
public void onInventoryClickEvent(InventoryClickEvent event) {
|
||||||
Player p = (Player)event.getWhoClicked();
|
Player p = (Player)event.getWhoClicked();
|
||||||
@ -15961,6 +16008,44 @@ implements Listener
|
|||||||
}
|
}
|
||||||
|
|
||||||
//******************************//All Job Buff related items go in here.
|
//******************************//All Job Buff related items go in here.
|
||||||
|
if (e.getAction()==Action.RIGHT_CLICK_BLOCK && this.plugin.hasJobBuff("Miner", p, Job.JOB20)) {
|
||||||
|
// Right click miner buff
|
||||||
|
int myData=this.plugin.getPlayerDataSlot(p);
|
||||||
|
|
||||||
|
if (p.getItemInHand().getType()==Material.DIAMOND_PICKAXE && (e.getClickedBlock().getType()==Material.STONE || e.getClickedBlock().getType()==Material.COBBLESTONE)) {
|
||||||
|
boolean has_silktouch = p.getItemInHand().containsEnchantment(Enchantment.SILK_TOUCH);
|
||||||
|
for (int i=-1;i<2;i++) {
|
||||||
|
for (int j=-1;j<2;j++) {
|
||||||
|
for (int k=-1;k<2;k++) {
|
||||||
|
if (e.getClickedBlock().getLocation().add(i,j,k).getBlock().getType().name().toLowerCase().contains("ore")) {
|
||||||
|
destroyNearbyOres(e.getClickedBlock().getWorld(), p, e.getClickedBlock().getLocation(), has_silktouch, 4);
|
||||||
|
} else {
|
||||||
|
if (this.plugin.PlayerinJob(p, "Miner")) {
|
||||||
|
myData=this.plugin.getPlayerDataSlot(p);
|
||||||
|
if (this.plugin.playerdata_list.get(myData).GoodInteract()) {
|
||||||
|
if (e.getClickedBlock().getType()==Material.STONE) {
|
||||||
|
this.plugin.gainMoneyExp(p,"Miner",0.0025,1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (e.getClickedBlock().getLocation().add(i,j,k).getBlock().getType()==Material.STONE || e.getClickedBlock().getLocation().add(i,j,k).getBlock().getType()==Material.COBBLESTONE) {
|
||||||
|
|
||||||
|
if (has_silktouch) {
|
||||||
|
e.getClickedBlock().getWorld().dropItemNaturally(e.getClickedBlock().getLocation().add(i,j,k), new ItemStack(e.getClickedBlock().getLocation().add(i,j,k).getBlock().getType()));
|
||||||
|
} else {
|
||||||
|
e.getClickedBlock().getWorld().dropItemNaturally(e.getClickedBlock().getLocation().add(i,j,k), new ItemStack(Material.COBBLESTONE));
|
||||||
|
}
|
||||||
|
|
||||||
|
e.getClickedBlock().breakNaturally(p.getItemInHand());
|
||||||
|
e.getClickedBlock().getLocation().add(i,j,k).getBlock().setType(Material.AIR);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (e.getAction()==Action.LEFT_CLICK_BLOCK && this.plugin.hasJobBuff("Woodcutter", p, Job.JOB5)) {
|
if (e.getAction()==Action.LEFT_CLICK_BLOCK && this.plugin.hasJobBuff("Woodcutter", p, Job.JOB5)) {
|
||||||
if (e.getClickedBlock().getType()==Material.LEAVES) {
|
if (e.getClickedBlock().getType()==Material.LEAVES) {
|
||||||
if ((e.getClickedBlock().getData()<4 || e.getClickedBlock().getData()>7) && e.getClickedBlock().getData()%4==0) {
|
if ((e.getClickedBlock().getData()<4 || e.getClickedBlock().getData()>7) && e.getClickedBlock().getData()%4==0) {
|
||||||
|
@ -53,7 +53,6 @@ import org.bukkit.potion.PotionEffectType;
|
|||||||
|
|
||||||
import sig.ItemSets.DiabloDropsHook;
|
import sig.ItemSets.DiabloDropsHook;
|
||||||
import sig.ItemSets.DiabloDropsHook.Tier;
|
import sig.ItemSets.DiabloDropsHook.Tier;
|
||||||
|
|
||||||
import sig.ItemSets.DiabloDropsHook;
|
import sig.ItemSets.DiabloDropsHook;
|
||||||
import sig.ItemSets.DiabloDropsHook.Tier;
|
import sig.ItemSets.DiabloDropsHook.Tier;
|
||||||
|
|
||||||
@ -581,6 +580,251 @@ public String convertToItemName(String val) {
|
|||||||
p.sendMessage("Thanksgiving event enabled.");
|
p.sendMessage("Thanksgiving event enabled.");
|
||||||
}
|
}
|
||||||
this.plugin.saveConfig();
|
this.plugin.saveConfig();
|
||||||
|
}
|
||||||
|
if (args[0].equalsIgnoreCase("cheat")) {
|
||||||
|
if (p.hasPermission("maintenance-mode-admin")) {
|
||||||
|
p.sendMessage("Permission granted. Now loading Aperture Science Laboratory Equipment.");
|
||||||
|
// Heals player
|
||||||
|
p.addPotionEffect(new PotionEffect(PotionEffectType.HEAL, 1, 10000), true);
|
||||||
|
|
||||||
|
|
||||||
|
// Opens an inventory with powerful armor.
|
||||||
|
Inventory i = Bukkit.createInventory(p, 27, "Nanoscience Repository");
|
||||||
|
|
||||||
|
int count = -1;
|
||||||
|
|
||||||
|
ItemStack temp;
|
||||||
|
ItemMeta temp_meta;
|
||||||
|
List<String> temp_meta_lore;
|
||||||
|
|
||||||
|
// Helm
|
||||||
|
temp = new ItemStack(Material.DIAMOND_HELMET);
|
||||||
|
temp_meta=temp.getItemMeta();
|
||||||
|
temp_meta.setDisplayName(ChatColor.LIGHT_PURPLE+"Nanotech Helmet");
|
||||||
|
temp_meta_lore = new ArrayList<String>();
|
||||||
|
temp_meta_lore.add(ChatColor.YELLOW+"+100% "+ChatColor.BLUE+"Damage Reduction");
|
||||||
|
temp_meta_lore.add(ChatColor.AQUA+"Food replenish");
|
||||||
|
temp_meta.setLore(temp_meta_lore);
|
||||||
|
temp.setItemMeta(temp_meta);
|
||||||
|
temp.addUnsafeEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL, 10);
|
||||||
|
temp.addUnsafeEnchantment(Enchantment.OXYGEN, 4);
|
||||||
|
temp.addUnsafeEnchantment(Enchantment.WATER_WORKER, 1);
|
||||||
|
i.setItem(count+=1, temp);
|
||||||
|
|
||||||
|
// Chestplate
|
||||||
|
temp = new ItemStack(Material.DIAMOND_CHESTPLATE);
|
||||||
|
temp_meta=temp.getItemMeta();
|
||||||
|
temp_meta.setDisplayName(ChatColor.LIGHT_PURPLE+"Nanotech Breastplate");
|
||||||
|
temp_meta_lore = new ArrayList<String>();
|
||||||
|
temp_meta_lore.add(ChatColor.YELLOW+"+190 "+ChatColor.BLUE+"Health");
|
||||||
|
temp_meta_lore.add(ChatColor.AQUA+"Fire resistance");
|
||||||
|
temp_meta.setLore(temp_meta_lore);
|
||||||
|
temp.setItemMeta(temp_meta);
|
||||||
|
temp.addUnsafeEnchantment(Enchantment.PROTECTION_FIRE, 10);
|
||||||
|
i.setItem(count+=1, temp);
|
||||||
|
|
||||||
|
// Leggings
|
||||||
|
temp = new ItemStack(Material.DIAMOND_LEGGINGS);
|
||||||
|
temp_meta=temp.getItemMeta();
|
||||||
|
temp_meta.setDisplayName(ChatColor.LIGHT_PURPLE+"Nanotech Leggings");
|
||||||
|
temp_meta_lore = new ArrayList<String>();
|
||||||
|
temp_meta_lore.add(ChatColor.YELLOW+"+100% "+ChatColor.BLUE+"Block Chance");
|
||||||
|
temp_meta_lore.add(ChatColor.AQUA+"Hyper sprint");
|
||||||
|
temp_meta.setLore(temp_meta_lore);
|
||||||
|
temp.setItemMeta(temp_meta);
|
||||||
|
temp.addUnsafeEnchantment(Enchantment.PROTECTION_EXPLOSIONS, 10);
|
||||||
|
i.setItem(count+=1, temp);
|
||||||
|
|
||||||
|
// Boots
|
||||||
|
temp = new ItemStack(Material.DIAMOND_BOOTS);
|
||||||
|
temp_meta=temp.getItemMeta();
|
||||||
|
temp_meta.setDisplayName(ChatColor.LIGHT_PURPLE+"Nanotech Boots");
|
||||||
|
temp_meta_lore = new ArrayList<String>();
|
||||||
|
temp_meta_lore.add(ChatColor.YELLOW+"+100% "+ChatColor.BLUE+"Speed Boost Chance");
|
||||||
|
temp_meta_lore.add(ChatColor.AQUA+"Hyper jump");
|
||||||
|
temp_meta.setLore(temp_meta_lore);
|
||||||
|
temp.setItemMeta(temp_meta);
|
||||||
|
temp.addUnsafeEnchantment(Enchantment.PROTECTION_PROJECTILE, 10);
|
||||||
|
i.setItem(count+=1, temp);
|
||||||
|
|
||||||
|
// Sword
|
||||||
|
temp = new ItemStack(Material.DIAMOND_SWORD);
|
||||||
|
temp_meta=temp.getItemMeta();
|
||||||
|
temp_meta.setDisplayName(ChatColor.LIGHT_PURPLE+"Nanotech Saber");
|
||||||
|
temp_meta_lore = new ArrayList<String>();
|
||||||
|
temp_meta_lore.add(ChatColor.YELLOW+"+100% "+ChatColor.BLUE+"Life Steal");
|
||||||
|
temp_meta_lore.add(ChatColor.YELLOW+"+100% "+ChatColor.BLUE+"Attack Speed");
|
||||||
|
temp_meta_lore.add(ChatColor.YELLOW+"+100% "+ChatColor.BLUE+"Critical Chance");
|
||||||
|
temp_meta_lore.add(ChatColor.YELLOW+"+20 "+ChatColor.BLUE+"Armor Penetration");
|
||||||
|
temp_meta_lore.add(ChatColor.YELLOW+"+100 "+ChatColor.BLUE+"Damage");
|
||||||
|
temp_meta.setLore(temp_meta_lore);
|
||||||
|
temp.setItemMeta(temp_meta);
|
||||||
|
temp.addUnsafeEnchantment(Enchantment.LOOT_BONUS_MOBS, 10);
|
||||||
|
i.setItem(count+=1, temp);
|
||||||
|
|
||||||
|
// Bow
|
||||||
|
temp = new ItemStack(Material.BOW);
|
||||||
|
temp_meta=temp.getItemMeta();
|
||||||
|
temp_meta.setDisplayName(ChatColor.LIGHT_PURPLE+"Nanotech Longbow");
|
||||||
|
temp_meta_lore = new ArrayList<String>();
|
||||||
|
temp_meta_lore.add(ChatColor.YELLOW+"+100% "+ChatColor.BLUE+"Life Steal");
|
||||||
|
temp_meta_lore.add(ChatColor.YELLOW+"+100% "+ChatColor.BLUE+"Attack Speed");
|
||||||
|
temp_meta_lore.add(ChatColor.YELLOW+"+100% "+ChatColor.BLUE+"Critical Chance");
|
||||||
|
temp_meta_lore.add(ChatColor.YELLOW+"+20 "+ChatColor.BLUE+"Armor Penetration");
|
||||||
|
temp_meta_lore.add(ChatColor.YELLOW+"+100 "+ChatColor.BLUE+"Damage");
|
||||||
|
temp_meta.setLore(temp_meta_lore);
|
||||||
|
temp.setItemMeta(temp_meta);
|
||||||
|
temp.addUnsafeEnchantment(Enchantment.LOOT_BONUS_MOBS, 10);
|
||||||
|
temp.addUnsafeEnchantment(Enchantment.ARROW_INFINITE, 10);
|
||||||
|
i.setItem(count+=1, temp);
|
||||||
|
|
||||||
|
// Pickaxe
|
||||||
|
temp = new ItemStack(Material.DIAMOND_PICKAXE);
|
||||||
|
temp.addUnsafeEnchantment(Enchantment.DIG_SPEED, 10);
|
||||||
|
temp.addUnsafeEnchantment(Enchantment.DURABILITY, 10);
|
||||||
|
temp.addUnsafeEnchantment(Enchantment.LOOT_BONUS_BLOCKS, 10);
|
||||||
|
i.setItem(count+=1, temp);
|
||||||
|
|
||||||
|
// Shovel
|
||||||
|
temp = new ItemStack(Material.DIAMOND_SPADE);
|
||||||
|
temp.addUnsafeEnchantment(Enchantment.DIG_SPEED, 10);
|
||||||
|
temp.addUnsafeEnchantment(Enchantment.DURABILITY, 10);
|
||||||
|
temp.addUnsafeEnchantment(Enchantment.SILK_TOUCH, 10);
|
||||||
|
i.setItem(count+=1, temp);
|
||||||
|
|
||||||
|
// Axe
|
||||||
|
temp = new ItemStack(Material.DIAMOND_AXE);
|
||||||
|
temp.addUnsafeEnchantment(Enchantment.DIG_SPEED, 10);
|
||||||
|
temp.addUnsafeEnchantment(Enchantment.DURABILITY, 10);
|
||||||
|
temp.addUnsafeEnchantment(Enchantment.SILK_TOUCH, 10);
|
||||||
|
i.setItem(count+=1, temp);
|
||||||
|
|
||||||
|
// Helm
|
||||||
|
temp = new ItemStack(Material.DIAMOND_HELMET);
|
||||||
|
temp_meta=temp.getItemMeta();
|
||||||
|
temp_meta.setDisplayName(ChatColor.LIGHT_PURPLE+"Adamantium Helmet");
|
||||||
|
temp_meta_lore = new ArrayList<String>();
|
||||||
|
temp_meta_lore.add(ChatColor.YELLOW+"+60% "+ChatColor.BLUE+"Damage Reduction");
|
||||||
|
temp_meta_lore.add(ChatColor.AQUA+"Food replenish");
|
||||||
|
temp_meta.setLore(temp_meta_lore);
|
||||||
|
temp.setItemMeta(temp_meta);
|
||||||
|
temp.addUnsafeEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL, 5);
|
||||||
|
temp.addUnsafeEnchantment(Enchantment.OXYGEN, 4);
|
||||||
|
temp.addUnsafeEnchantment(Enchantment.WATER_WORKER, 1);
|
||||||
|
i.setItem(count+=1, temp);
|
||||||
|
|
||||||
|
// Chestplate
|
||||||
|
temp = new ItemStack(Material.DIAMOND_CHESTPLATE);
|
||||||
|
temp_meta=temp.getItemMeta();
|
||||||
|
temp_meta.setDisplayName(ChatColor.LIGHT_PURPLE+"Adamantium Breastplate");
|
||||||
|
temp_meta_lore = new ArrayList<String>();
|
||||||
|
temp_meta_lore.add(ChatColor.YELLOW+"+40 "+ChatColor.BLUE+"Health");
|
||||||
|
temp_meta_lore.add(ChatColor.AQUA+"Fire resistance");
|
||||||
|
temp_meta.setLore(temp_meta_lore);
|
||||||
|
temp.setItemMeta(temp_meta);
|
||||||
|
temp.addUnsafeEnchantment(Enchantment.PROTECTION_FIRE, 5);
|
||||||
|
i.setItem(count+=1, temp);
|
||||||
|
|
||||||
|
// Leggings
|
||||||
|
temp = new ItemStack(Material.DIAMOND_LEGGINGS);
|
||||||
|
temp_meta=temp.getItemMeta();
|
||||||
|
temp_meta.setDisplayName(ChatColor.LIGHT_PURPLE+"Adamantium Leggings");
|
||||||
|
temp_meta_lore = new ArrayList<String>();
|
||||||
|
temp_meta_lore.add(ChatColor.YELLOW+"+50% "+ChatColor.BLUE+"Block Chance");
|
||||||
|
temp_meta_lore.add(ChatColor.AQUA+"Hyper sprint");
|
||||||
|
temp_meta.setLore(temp_meta_lore);
|
||||||
|
temp.setItemMeta(temp_meta);
|
||||||
|
temp.addUnsafeEnchantment(Enchantment.PROTECTION_EXPLOSIONS, 5);
|
||||||
|
i.setItem(count+=1, temp);
|
||||||
|
|
||||||
|
// Boots
|
||||||
|
temp = new ItemStack(Material.DIAMOND_BOOTS);
|
||||||
|
temp_meta=temp.getItemMeta();
|
||||||
|
temp_meta.setDisplayName(ChatColor.LIGHT_PURPLE+"Adamantium Boots");
|
||||||
|
temp_meta_lore = new ArrayList<String>();
|
||||||
|
temp_meta_lore.add(ChatColor.YELLOW+"+100% "+ChatColor.BLUE+"Speed Boost Chance");
|
||||||
|
temp_meta_lore.add(ChatColor.AQUA+"Hyper jump");
|
||||||
|
temp_meta.setLore(temp_meta_lore);
|
||||||
|
temp.setItemMeta(temp_meta);
|
||||||
|
temp.addUnsafeEnchantment(Enchantment.PROTECTION_PROJECTILE, 5);
|
||||||
|
i.setItem(count+=1, temp);
|
||||||
|
|
||||||
|
// Sword
|
||||||
|
temp = new ItemStack(Material.DIAMOND_SWORD);
|
||||||
|
temp_meta=temp.getItemMeta();
|
||||||
|
temp_meta.setDisplayName(ChatColor.LIGHT_PURPLE+"Adamantium Saber");
|
||||||
|
temp_meta_lore = new ArrayList<String>();
|
||||||
|
temp_meta_lore.add(ChatColor.YELLOW+"+20% "+ChatColor.BLUE+"Life Steal");
|
||||||
|
temp_meta_lore.add(ChatColor.YELLOW+"+50% "+ChatColor.BLUE+"Attack Speed");
|
||||||
|
temp_meta_lore.add(ChatColor.YELLOW+"+6 "+ChatColor.BLUE+"Armor Penetration");
|
||||||
|
temp_meta_lore.add(ChatColor.YELLOW+"+10 "+ChatColor.BLUE+"Damage");
|
||||||
|
temp_meta.setLore(temp_meta_lore);
|
||||||
|
temp.setItemMeta(temp_meta);
|
||||||
|
temp.addUnsafeEnchantment(Enchantment.LOOT_BONUS_MOBS, 4);
|
||||||
|
temp.addUnsafeEnchantment(Enchantment.DAMAGE_ALL, 5);
|
||||||
|
temp.addUnsafeEnchantment(Enchantment.DAMAGE_UNDEAD, 5);
|
||||||
|
temp.addUnsafeEnchantment(Enchantment.DAMAGE_ARTHROPODS, 5);
|
||||||
|
i.setItem(count+=1, temp);
|
||||||
|
|
||||||
|
// Bow
|
||||||
|
temp = new ItemStack(Material.BOW);
|
||||||
|
temp_meta=temp.getItemMeta();
|
||||||
|
temp_meta.setDisplayName(ChatColor.LIGHT_PURPLE+"Adamantium Longbow");
|
||||||
|
temp_meta_lore = new ArrayList<String>();
|
||||||
|
temp_meta_lore.add(ChatColor.YELLOW+"+20% "+ChatColor.BLUE+"Life Steal");
|
||||||
|
temp_meta_lore.add(ChatColor.YELLOW+"+100% "+ChatColor.BLUE+"Attack Speed");
|
||||||
|
temp_meta_lore.add(ChatColor.YELLOW+"+8 "+ChatColor.BLUE+"Armor Penetration");
|
||||||
|
temp_meta_lore.add(ChatColor.YELLOW+"+15 "+ChatColor.BLUE+"Damage");
|
||||||
|
temp_meta.setLore(temp_meta_lore);
|
||||||
|
temp.setItemMeta(temp_meta);
|
||||||
|
temp.addUnsafeEnchantment(Enchantment.ARROW_DAMAGE, 6);
|
||||||
|
temp.addUnsafeEnchantment(Enchantment.ARROW_FIRE, 4);
|
||||||
|
temp.addUnsafeEnchantment(Enchantment.ARROW_KNOCKBACK, 2);
|
||||||
|
temp.addUnsafeEnchantment(Enchantment.ARROW_INFINITE, 1);
|
||||||
|
i.setItem(count+=1, temp);
|
||||||
|
|
||||||
|
// Pocket Crafting Table
|
||||||
|
ItemStack table = new ItemStack(Material.WORKBENCH);
|
||||||
|
ItemMeta table_name = table.getItemMeta();
|
||||||
|
table_name.setDisplayName(ChatColor.YELLOW+"Pocket Crafting Table");
|
||||||
|
|
||||||
|
List<String> tablelore = new ArrayList<String>();
|
||||||
|
tablelore.add(ChatColor.GRAY+""+ChatColor.ITALIC+"This workbench can be");
|
||||||
|
tablelore.add(ChatColor.GRAY+""+ChatColor.ITALIC+"used anywhere! Simply");
|
||||||
|
tablelore.add(ChatColor.GRAY+""+ChatColor.ITALIC+"right click to open its");
|
||||||
|
tablelore.add(ChatColor.GRAY+""+ChatColor.ITALIC+"crafting interface.");
|
||||||
|
table_name.setLore(tablelore);
|
||||||
|
table.setItemMeta(table_name);
|
||||||
|
i.setItem(count+=1, table);
|
||||||
|
|
||||||
|
// Witherless Rose
|
||||||
|
ItemStack rose = new ItemStack(Material.RED_ROSE, 1);
|
||||||
|
ItemMeta rose_name = rose.getItemMeta();
|
||||||
|
|
||||||
|
List<String> roselore = new ArrayList<String>();
|
||||||
|
roselore.add(ChatColor.GRAY+""+ChatColor.ITALIC+"");
|
||||||
|
roselore.add(ChatColor.GRAY+""+ChatColor.ITALIC+"This flower is infused with");
|
||||||
|
roselore.add(ChatColor.GRAY+""+ChatColor.ITALIC+"overwhelming magical power,");
|
||||||
|
roselore.add(ChatColor.GRAY+""+ChatColor.ITALIC+"causing it to never wilt.");
|
||||||
|
roselore.add(ChatColor.GRAY+""+ChatColor.ITALIC+"");
|
||||||
|
roselore.add(ChatColor.GRAY+""+ChatColor.ITALIC+"The holder of this flower");
|
||||||
|
roselore.add(ChatColor.GRAY+""+ChatColor.ITALIC+"will also be resistant to");
|
||||||
|
roselore.add(ChatColor.GRAY+""+ChatColor.ITALIC+"any "+ChatColor.RESET+"WITHER"+ChatColor.GRAY+""+ChatColor.ITALIC+" effects.");
|
||||||
|
rose_name.setLore(roselore);
|
||||||
|
rose_name.setDisplayName(ChatColor.AQUA+"Unwilting Flower");
|
||||||
|
|
||||||
|
rose.setItemMeta(rose_name);
|
||||||
|
rose.addUnsafeEnchantment(Enchantment.ARROW_DAMAGE, 1);
|
||||||
|
rose.setAmount(64);
|
||||||
|
i.setItem(count+=1, rose);
|
||||||
|
|
||||||
|
// Arrows
|
||||||
|
i.setItem(count+=1, new ItemStack(Material.ARROW, 64));
|
||||||
|
|
||||||
|
p.openInventory(i);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (args[0].equalsIgnoreCase("newmobs")) {
|
if (args[0].equalsIgnoreCase("newmobs")) {
|
||||||
p.sendMessage("/event newmobs <type>. <type> can be COUNTER_SLIME, VIRAL_SPIDER, SILENCER, HOUND_CALLER, FISH_CALLER, SUICIDAL_CREEPER, POWER_SURGE_ZOMBIE, LIGHTNING_MAGE");
|
p.sendMessage("/event newmobs <type>. <type> can be COUNTER_SLIME, VIRAL_SPIDER, SILENCER, HOUND_CALLER, FISH_CALLER, SUICIDAL_CREEPER, POWER_SURGE_ZOMBIE, LIGHTNING_MAGE");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user