Merge branch 'master' of ssh://184.154.0.242:7999/min/mineplex

This commit is contained in:
Chiss 2014-12-09 20:24:07 +11:00
commit 6de278bb4f
12 changed files with 72 additions and 43 deletions

View File

@ -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);

View File

@ -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)
{

View File

@ -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<ClientClan> implements IRelation
{
@ -112,11 +116,18 @@ public class ClansManager extends MiniClientPlugin<ClientClan> 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<String> itemIgnore = new HashSet<String>();
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);

View File

@ -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);
}

View File

@ -17,7 +17,14 @@ public class BuildingPage extends ShopPageBase<ClansManager, BuildingShop>
@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<BuildingPage>(this, item));
}
}

View File

@ -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());

View File

@ -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());

View File

@ -73,7 +73,7 @@ public class BarbedArrows extends Skill
Player damageePlayer = event.GetDamageePlayer();
//Action
if (damageePlayer != null)
damageePlayer.setSprinting(false);
//Damage

View File

@ -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)));
}

View File

@ -51,6 +51,8 @@ public class SkillPage extends ShopPageBase<ClassShopManager, ClassCombatShop>
{
super.PlayerClosed();
if (!Shop.skillOnly())
{
if (Player != null && Player.isOnline())
{
for (int i = 9; i < 36; i++)
@ -59,6 +61,7 @@ public class SkillPage extends ShopPageBase<ClassShopManager, ClassCombatShop>
}
}
}
}
@Override
protected void BuildPage()

View File

@ -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

View File

@ -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);
}