diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/Clans.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/Clans.java index 137cb8a0d..9c709a989 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/Clans.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/Clans.java @@ -1,53 +1,30 @@ package mineplex.game.clans; -import mineplex.core.CustomTagFix; import mineplex.core.account.CoreClientManager; -import mineplex.core.achievement.AchievementManager; import mineplex.core.antihack.AntiHack; import mineplex.core.blockrestore.BlockRestore; import mineplex.core.command.CommandCenter; -import mineplex.core.cosmetic.CosmeticManager; -import mineplex.core.creature.Creature; -import mineplex.core.disguise.DisguiseManager; import mineplex.core.donation.DonationManager; -import mineplex.core.energy.Energy; +import mineplex.core.explosion.Explosion; import mineplex.core.friend.FriendManager; -import mineplex.core.gadget.GadgetManager; import mineplex.core.inventory.InventoryManager; import mineplex.core.itemstack.ItemStackFactory; import mineplex.core.logger.Logger; import mineplex.core.memory.MemoryFix; import mineplex.core.message.MessageManager; import mineplex.core.monitor.LagMeter; -import mineplex.core.mount.MountManager; -import mineplex.core.movement.Movement; -import mineplex.core.npc.NpcManager; -import mineplex.core.packethandler.PacketHandler; -import mineplex.core.pet.PetManager; import mineplex.core.portal.Portal; import mineplex.core.preferences.PreferencesManager; -import mineplex.core.projectile.ProjectileManager; import mineplex.core.punish.Punish; import mineplex.core.recharge.Recharge; import mineplex.core.serverConfig.ServerConfiguration; import mineplex.core.spawn.Spawn; -import mineplex.core.stats.StatsManager; import mineplex.core.status.ServerStatusManager; import mineplex.core.teleport.Teleport; import mineplex.core.updater.FileUpdater; import mineplex.core.updater.Updater; import mineplex.game.clans.clans.ClansManager; -import mineplex.game.clans.fields.Field; -import mineplex.minecraft.game.classcombat.Class.ClassManager; -import mineplex.minecraft.game.classcombat.Condition.SkillConditionManager; -import mineplex.minecraft.game.classcombat.Skill.SkillFactory; -import mineplex.minecraft.game.classcombat.item.ItemFactory; -import mineplex.minecraft.game.classcombat.shop.ClassCombatShop; -import mineplex.minecraft.game.classcombat.shop.ClassShopManager; -import mineplex.minecraft.game.core.combat.CombatManager; -import mineplex.minecraft.game.core.condition.ConditionManager; -import mineplex.minecraft.game.core.damage.DamageManager; -import mineplex.minecraft.game.core.fire.Fire; +import mineplex.minecraft.game.core.mechanics.Weapon; import net.minecraft.server.v1_7_R4.MinecraftServer; import org.bukkit.plugin.java.JavaPlugin; @@ -103,7 +80,7 @@ public class Clans extends JavaPlugin BlockRestore blockRestore = new BlockRestore(this); new MemoryFix(this); - + new Explosion(this, blockRestore); new FriendManager(this, _clientManager, preferenceManager); new InventoryManager(this, _clientManager); diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansGame.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansGame.java index c085a6b90..8a1e9c27d 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansGame.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansGame.java @@ -151,7 +151,7 @@ public class ClansGame extends MiniPlugin @EventHandler(priority = EventPriority.LOW) public void BlockBreak(BlockBreakEvent event) { - if (event.getPlayer().getWorld().getEnvironment() != Environment.NORMAL) + if (event.isCancelled() || event.getPlayer().getWorld().getEnvironment() != Environment.NORMAL) return; String mimic = Clans.Get(event.getPlayer()).getMimic(); @@ -309,8 +309,8 @@ public class ClansGame extends MiniPlugin //Full Access if (access == ClanRelation.SELF) { - //Recruits cannot open Chests - if (event.getClickedBlock().getTypeId() == 54) + //Recruits cannot open Chests // IN OWN CLAIMED LAND + if (event.getClickedBlock().getTypeId() == 54 && Clans.getClanUtility().getOwner(loc) != null) { if (Clans.getClanUtility().getRole(player) == Role.RECRUIT) { diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansManager.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansManager.java index 3d6fed798..4c07c40f3 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansManager.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansManager.java @@ -1,5 +1,8 @@ package mineplex.game.clans.clans; +import java.util.HashSet; + +import org.bukkit.Location; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; @@ -49,6 +52,7 @@ import mineplex.minecraft.game.core.combat.CombatManager; import mineplex.minecraft.game.core.condition.ConditionManager; import mineplex.minecraft.game.core.damage.DamageManager; import mineplex.minecraft.game.core.fire.Fire; +import mineplex.minecraft.game.core.mechanics.Weapon; public class ClansManager extends MiniClientPlugin implements IRelation { @@ -112,11 +116,18 @@ public class ClansManager extends MiniClientPlugin implements IRelat DamageManager damageManager = new DamageManager(plugin, _combatManager, new NpcManager(plugin, creature), disguiseManager); + new Weapon(plugin, energy); new Gameplay(plugin, this, blockRestore, damageManager); ProjectileManager throwManager = new ProjectileManager(plugin); Fire fire = new Fire(plugin, _condition, damageManager); - ItemFactory itemFactory = new ItemFactory(plugin, blockRestore, _condition, damageManager, energy, fire, throwManager, webServerAddress); + + HashSet itemIgnore = new HashSet(); + itemIgnore.add("Proximity Explosive"); + itemIgnore.add("Proximity Zapper"); + + ItemFactory itemFactory = new ItemFactory(plugin, blockRestore, _condition, damageManager, energy, fire, throwManager, webServerAddress, itemIgnore); SkillFactory skillManager = new SkillFactory(plugin, damageManager, this, _combatManager, _condition, throwManager, disguiseManager, blockRestore, fire, new Movement(plugin), teleport, energy, webServerAddress); + skillManager.RemoveSkill("Dwarf Toss", "Block Toss"); _classManager = new ClassManager(plugin, _clientManager, donationManager, skillManager, itemFactory, webServerAddress); StatsManager statsManager = new StatsManager(plugin, _clientManager); diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/gameplay/Gameplay.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/gameplay/Gameplay.java index 576dd5dde..8b7e87d8f 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/gameplay/Gameplay.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/gameplay/Gameplay.java @@ -170,7 +170,8 @@ public class Gameplay extends MiniPlugin { public void run() { - block.setTypeId(8); + block.setType(Material.WATER); + block.setData((byte)0); block.getWorld().playEffect(block.getLocation(), Effect.STEP_SOUND, 8); block.getWorld().playSound(block.getLocation(), Sound.SPLASH, 2f, 1f); } diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/shop/BuildingPage.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/shop/BuildingPage.java index 69bf2b835..67e1b1f6c 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/shop/BuildingPage.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/shop/BuildingPage.java @@ -17,7 +17,14 @@ public class BuildingPage extends ShopPageBase @Override protected void BuildPage() { - PvpItem item = new PvpItem(Material.STONE, (byte)0, 1, "Stone", 25, 64); + addPvpItem(1, new PvpItem(Material.STONE, (byte)0, 1, "Stone", 25, 64)); + addPvpItem(1, new PvpItem(Material.STONE, (byte)0, 1, "Wood", 25, 64)); + addPvpItem(1, new PvpItem(Material.STONE, (byte)0, 1, "Stone", 25, 64)); + addPvpItem(1, new PvpItem(Material.STONE, (byte)0, 1, "Stone", 25, 64)); + } + + public void addPvpItem(int slot, PvpItem item) + { AddButton(1, item, new PvpShopButton(this, item)); } } diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/Immolate.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/Immolate.java index 700ff0e80..54b7cffef 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/Immolate.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/Immolate.java @@ -2,6 +2,7 @@ package mineplex.minecraft.game.classcombat.Skill.Mage; import java.util.HashSet; +import org.bukkit.ChatColor; import org.bukkit.Material; import org.bukkit.Sound; import org.bukkit.entity.Entity; @@ -11,6 +12,8 @@ import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.entity.EntityCombustEvent; import org.bukkit.event.player.PlayerDropItemEvent; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.ItemMeta; import org.bukkit.util.Vector; import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType; @@ -18,6 +21,7 @@ import mineplex.core.common.util.F; import mineplex.core.itemstack.ItemStackFactory; import mineplex.core.updater.event.UpdateEvent; import mineplex.core.updater.UpdateType; +import mineplex.core.common.util.UtilEnt; import mineplex.core.common.util.UtilGear; import mineplex.core.common.util.UtilPlayer; import mineplex.core.common.util.UtilServer; @@ -203,7 +207,12 @@ public class Immolate extends Skill int level = getLevel(cur); //Fire - Item fire = cur.getWorld().dropItem(cur.getLocation().add(0, 0.5, 0), ItemStackFactory.Instance.CreateStack(Material.BLAZE_POWDER)); + ItemStack itemStack = ItemStackFactory.Instance.CreateStack(Material.BLAZE_POWDER, 1); + ItemMeta meta = itemStack.getItemMeta(); + meta.setDisplayName(ChatColor.RESET + "" + UtilEnt.getNewEntityId(false)); + itemStack.setItemMeta(meta); + + Item fire = cur.getWorld().dropItem(cur.getLocation().add(0, 0.5, 0), itemStack); fire.setVelocity(new Vector((Math.random() - 0.5)/3,Math.random()/3,(Math.random() - 0.5)/3)); Factory.Fire().Add(fire, cur, 2, 0, 0.25 + (level * 0.25), 0, GetName()); diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/Inferno.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/Inferno.java index dd1a5543e..1fb9140b6 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/Inferno.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/Inferno.java @@ -2,12 +2,15 @@ package mineplex.minecraft.game.classcombat.Skill.Mage; import java.util.HashSet; +import org.bukkit.ChatColor; import org.bukkit.Material; import org.bukkit.Sound; import org.bukkit.entity.Item; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.block.Action; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.ItemMeta; import org.bukkit.util.Vector; import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType; @@ -15,6 +18,7 @@ import mineplex.core.common.util.F; import mineplex.core.itemstack.ItemStackFactory; import mineplex.core.updater.event.UpdateEvent; import mineplex.core.updater.UpdateType; +import mineplex.core.common.util.UtilEnt; import mineplex.core.common.util.UtilMath; import mineplex.core.common.util.UtilPlayer; import mineplex.minecraft.game.classcombat.Skill.SkillActive; @@ -103,7 +107,12 @@ public class Inferno extends SkillActive } //Fire - Item fire = cur.getWorld().dropItem(cur.getEyeLocation().add(cur.getLocation().getDirection()), ItemStackFactory.Instance.CreateStack(Material.BLAZE_POWDER)); + ItemStack itemStack = ItemStackFactory.Instance.CreateStack(Material.BLAZE_POWDER, 1); + ItemMeta meta = itemStack.getItemMeta(); + meta.setDisplayName(ChatColor.RESET + "" + UtilEnt.getNewEntityId(false)); + itemStack.setItemMeta(meta); + + Item fire = cur.getWorld().dropItem(cur.getEyeLocation().add(cur.getLocation().getDirection()), itemStack); Factory.Fire().Add(fire, cur, 0.7, 0, 0.3 + (0.1 * level), 1, GetName()); fire.teleport(cur.getEyeLocation()); diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Ranger/BarbedArrows.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Ranger/BarbedArrows.java index 30a2abf50..4d9f9640c 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Ranger/BarbedArrows.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Ranger/BarbedArrows.java @@ -73,8 +73,8 @@ public class BarbedArrows extends Skill Player damageePlayer = event.GetDamageePlayer(); - //Action - damageePlayer.setSprinting(false); + if (damageePlayer != null) + damageePlayer.setSprinting(false); //Damage event.AddMod(damager.getName(), GetName(), 0, false); diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Ranger/NapalmShot.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Ranger/NapalmShot.java index 368abd7ed..9f2fb7378 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Ranger/NapalmShot.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Ranger/NapalmShot.java @@ -3,6 +3,7 @@ package mineplex.minecraft.game.classcombat.Skill.Ranger; import java.util.HashSet; import java.util.Iterator; +import org.bukkit.ChatColor; import org.bukkit.Material; import org.bukkit.Sound; import org.bukkit.entity.Arrow; @@ -14,9 +15,12 @@ import org.bukkit.event.EventHandler; import org.bukkit.event.block.Action; import org.bukkit.event.entity.EntityShootBowEvent; import org.bukkit.event.entity.ProjectileHitEvent; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.ItemMeta; import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType; import mineplex.core.common.util.F; +import mineplex.core.common.util.UtilEnt; import mineplex.core.common.util.UtilParticle; import mineplex.core.itemstack.ItemStackFactory; import mineplex.core.updater.event.UpdateEvent; @@ -121,7 +125,12 @@ public class NapalmShot extends SkillActive for (int i = 0 ; i < 8 + (8 * level) ; i++) { - Item fire = proj.getWorld().dropItemNaturally(proj.getLocation(), ItemStackFactory.Instance.CreateStack(Material.BLAZE_POWDER, 1)); + ItemStack itemStack = ItemStackFactory.Instance.CreateStack(Material.BLAZE_POWDER, 1); + ItemMeta meta = itemStack.getItemMeta(); + meta.setDisplayName(ChatColor.RESET + "" + UtilEnt.getNewEntityId(false)); + itemStack.setItemMeta(meta); + + Item fire = proj.getWorld().dropItemNaturally(proj.getLocation(), itemStack); Factory.Fire().Add(fire, damager, 16, 0.25, 2, 0, GetName()); fire.setVelocity(fire.getVelocity().multiply(1 + (0.15 * level))); } diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/page/SkillPage.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/page/SkillPage.java index 105cd7a34..7104f461d 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/page/SkillPage.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/page/SkillPage.java @@ -51,11 +51,14 @@ public class SkillPage extends ShopPageBase { super.PlayerClosed(); - if (Player != null && Player.isOnline()) + if (!Shop.skillOnly()) { - for (int i = 9; i < 36; i++) + if (Player != null && Player.isOnline()) { - Player.getInventory().setItem(i, null); + for (int i = 9; i < 36; i++) + { + Player.getInventory().setItem(i, null); + } } } } diff --git a/Plugins/Mineplex.Minecraft.Game.Core/src/mineplex/minecraft/game/core/fire/Fire.java b/Plugins/Mineplex.Minecraft.Game.Core/src/mineplex/minecraft/game/core/fire/Fire.java index 8f3635ed0..9ace55077 100644 --- a/Plugins/Mineplex.Minecraft.Game.Core/src/mineplex/minecraft/game/core/fire/Fire.java +++ b/Plugins/Mineplex.Minecraft.Game.Core/src/mineplex/minecraft/game/core/fire/Fire.java @@ -13,6 +13,7 @@ import mineplex.minecraft.game.core.condition.ConditionManager; import mineplex.minecraft.game.core.condition.Condition.ConditionType; import mineplex.minecraft.game.core.damage.DamageManager; +import org.bukkit.ChatColor; import org.bukkit.Effect; import org.bukkit.EntityEffect; import org.bukkit.Location; @@ -24,9 +25,11 @@ import org.bukkit.event.EventPriority; import org.bukkit.event.entity.EntityDamageEvent.DamageCause; import org.bukkit.event.inventory.InventoryPickupItemEvent; import org.bukkit.event.player.PlayerPickupItemEvent; +import org.bukkit.inventory.meta.ItemMeta; +import org.bukkit.metadata.FixedMetadataValue; +import org.bukkit.metadata.MetadataValue; import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.potion.PotionEffectType; - import org.bukkit.craftbukkit.v1_7_R4.entity.CraftPlayer; public class Fire extends MiniPlugin @@ -34,7 +37,7 @@ public class Fire extends MiniPlugin private ConditionManager _conditionManager; private DamageManager _damageManager; private HashMap _fire = new HashMap(); - + public Fire(JavaPlugin plugin, ConditionManager conditionManager, DamageManager damageManager) { super("Fire", plugin); diff --git a/Plugins/Nautilus.Game.PvP/src/nautilus/game/pvp/modules/Gameplay.java b/Plugins/Nautilus.Game.PvP/src/nautilus/game/pvp/modules/Gameplay.java index 6d9daa43a..49fd8a0e7 100644 --- a/Plugins/Nautilus.Game.PvP/src/nautilus/game/pvp/modules/Gameplay.java +++ b/Plugins/Nautilus.Game.PvP/src/nautilus/game/pvp/modules/Gameplay.java @@ -366,7 +366,7 @@ public class Gameplay extends AModule { public void run() { - block.setTypeId(8); + block.setTypeId(9); block.getWorld().playEffect(block.getLocation(), Effect.STEP_SOUND, 8); block.getWorld().playSound(block.getLocation(), Sound.SPLASH, 2f, 1f); }