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

This commit is contained in:
Mini-Chiss 2015-07-29 12:22:11 +02:00
commit c3e07522b4
14 changed files with 140 additions and 51 deletions

View File

@ -37,6 +37,7 @@
</codeStyleSettings>
</value>
</option>
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Mineplex" />
</component>
</project>

View File

@ -208,7 +208,7 @@ public class AchievementManager extends MiniPlugin
{
int level = get(sender, Achievement.GLOBAL_MINEPLEX_LEVEL).getLevel();
if (sender.getName().equalsIgnoreCase("Phinary"))
if (sender.getName().equalsIgnoreCase("Phinary") || sender.getName().equalsIgnoreCase("Horus"))
level = -level;
else if (sender.getName().equalsIgnoreCase("B2_mp"))
return 101;
@ -220,6 +220,8 @@ public class AchievementManager extends MiniPlugin
level = Math.max(level, 15);
else if (rank.Has(Rank.MODERATOR))
level = Math.max(level, 5);
else if (rank.Has(Rank.JNR_DEV))
level = Math.max(level, 25);
return level;
}

View File

@ -17,6 +17,7 @@ import mineplex.core.cosmetic.ui.button.ActivateGadgetButton;
import mineplex.core.cosmetic.ui.button.DeactivateGadgetButton;
import mineplex.core.cosmetic.ui.button.GadgetButton;
import mineplex.core.donation.DonationManager;
import mineplex.core.gadget.gadgets.MorphBlock;
import mineplex.core.gadget.gadgets.MorphNotch;
import mineplex.core.gadget.types.Gadget;
import mineplex.core.gadget.types.GadgetType;
@ -68,6 +69,13 @@ public class GadgetPage extends ShopPageBase<CosmeticManager, CosmeticShop>
//setItem(slot, new ShopItem(gadget.GetDisplayMaterial(), gadget.GetDisplayData(), "Disabled " + gadget.GetName(), new String[] { "Sorry! Currently disabled until fix is made for 1.8 players!" }, 1, false, false));
//return;
}
else if (gadget instanceof MorphBlock)
{
//Prevent stacker bug
if (getPlayer().getPassenger() != null)
return;
}
List<String> itemLore = new ArrayList<String>();
if (gadget.GetCost(CurrencyType.Coins) >= 0)

View File

@ -7,6 +7,18 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map.Entry;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.craftbukkit.v1_7_R4.inventory.CraftInventoryCustom;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.HandlerList;
import org.bukkit.event.Listener;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.event.inventory.InventoryCloseEvent;
import org.bukkit.inventory.ItemStack;
import mineplex.core.antihack.AntiHack;
import mineplex.core.common.Rank;
import mineplex.core.common.util.C;
@ -23,18 +35,6 @@ import mineplex.core.punish.PunishmentSorter;
import mineplex.core.shop.item.IButton;
import mineplex.core.shop.item.ShopItem;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.craftbukkit.v1_7_R4.inventory.CraftInventoryCustom;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.HandlerList;
import org.bukkit.event.Listener;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.event.inventory.InventoryCloseEvent;
import org.bukkit.inventory.ItemStack;
public class PunishPage extends CraftInventoryCustom implements Listener
{
private Punish _plugin;
@ -232,14 +232,12 @@ public class PunishPage extends CraftInventoryCustom implements Listener
examplePrefixEx + " Forcefield",
examplePrefixEx + " Speed Hack",
examplePrefixEx + " Reach Hack",
examplePrefixEx + " Speed Hack",
examplePrefixEx + " Other Hack",
" ",
examplePrefix + "Hack Reports (SR & FR);",
examplePrefixEx + " Forcefield",
examplePrefixEx + " Speed Hack",
examplePrefixEx + " Reach Hack",
examplePrefixEx + " Speed Hack",
examplePrefixEx + " Other Hack",
examplePrefixEx + " Fly Hack",
}

View File

@ -327,6 +327,11 @@ public class TreasureLocation implements Listener
_hologram.start();
}
public Treasure getCurrentTreasure()
{
return _currentTreasure;
}
public void openShop(Player player)
{
_shop.attemptShopOpen(player);

View File

@ -125,6 +125,22 @@ public class TreasureManager extends MiniPlugin
return _rewardManager.getRewards(player, rewardType);
}
public boolean isOpening(Player player)
{
for (TreasureLocation treasureLocation : _treasureLocations)
{
Treasure treasure = treasureLocation.getCurrentTreasure();
if (treasure == null)
continue;
if (treasure.getPlayer().equals(player))
return true;
}
return false;
}
public BlockRestore getBlockRestore()
{
return _blockRestore;

View File

@ -1,16 +1,13 @@
package mineplex.hub;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.HashMap;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Color;
import org.bukkit.GameMode;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.craftbukkit.v1_7_R4.CraftWorld;
import org.bukkit.entity.Egg;
import org.bukkit.entity.Entity;
@ -54,7 +51,6 @@ import mineplex.core.common.util.C;
import mineplex.core.common.util.F;
import mineplex.core.common.util.UtilAction;
import mineplex.core.common.util.UtilAlg;
import mineplex.core.common.util.UtilFirework;
import mineplex.core.common.util.UtilInv;
import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilPlayer;
@ -91,11 +87,11 @@ import mineplex.hub.commands.GadgetToggle;
import mineplex.hub.commands.GameModeCommand;
import mineplex.hub.commands.NewsCommand;
import mineplex.hub.modules.ForcefieldManager;
import mineplex.hub.modules.HubVisibilityManager;
import mineplex.hub.modules.JumpManager;
import mineplex.hub.modules.NewsManager;
import mineplex.hub.modules.ParkourManager;
import mineplex.hub.modules.TextManager;
import mineplex.hub.modules.HubVisibilityManager;
import mineplex.hub.modules.WorldManager;
import mineplex.hub.poll.PollManager;
import mineplex.hub.tutorial.TutorialManager;
@ -899,6 +895,11 @@ public class HubManager extends MiniClientPlugin<HubClient>
return _gadgetManager;
}
public TreasureManager GetTreasure()
{
return _treasureManager;
}
public MountManager GetMount()
{
return _mountManager;

View File

@ -28,6 +28,8 @@ import mineplex.core.common.util.UtilGear;
import mineplex.core.common.util.UtilPlayer;
import mineplex.core.common.util.UtilEvent.ActionType;
import mineplex.core.event.StackerEvent;
import mineplex.core.gadget.gadgets.MorphBlock;
import mineplex.core.gadget.types.GadgetType;
import mineplex.core.projectile.IThrown;
import mineplex.core.projectile.ProjectileManager;
import mineplex.core.projectile.ProjectileUser;
@ -105,15 +107,33 @@ public class StackerManager extends MiniPlugin implements IThrown
return;
}
if (Manager.GetGadget().getActive(stacker, GadgetType.Morph) instanceof MorphBlock)
{
UtilPlayer.message(stacker, F.main("Stacker", "You cannot stack while using the Block Morph."));
return;
}
if (Manager.GetTreasure().isOpening(stacker))
return;
stackerEvent = new StackerEvent(stackee);
Bukkit.getServer().getPluginManager().callEvent(stackerEvent);
if (stackerEvent.isCancelled())
return;
if (stackee instanceof Player && !Manager.CanBump(((Player)stackee)))
if (stackee instanceof Player)
{
UtilPlayer.message(stacker, F.main("Stacker", F.name(UtilEnt.getName(stackee)) + " is not playing stacker."));
return;
if (!Manager.CanBump(((Player)stackee)))
{
UtilPlayer.message(stacker, F.main("Stacker", F.name(UtilEnt.getName(stackee)) + " is not playing stacker."));
return;
}
if (Manager.GetTreasure().isOpening((Player) stackee))
{
UtilPlayer.message(stacker, F.main("Stacker", F.main("Stacker", F.name(UtilEnt.getName(stackee)) + " is opening a chest!")));
return;
}
}
if (stackee instanceof LivingEntity)

View File

@ -561,7 +561,7 @@ public class BombLobbers extends TeamGame implements IThrown
if (target != null)
UtilAction.velocity(target, UtilAlg.getTrajectory2d(data.GetThrown().getLocation(), target.getLocation()), .2, false, 0, 0.2, .4, true);
Manager.GetDamage().NewDamageEvent(target, data.GetThrower(), null, DamageCause.PROJECTILE, 6.0, false, false, true, "Throwing TNT", "Throwing TNT Direct Hit");
Manager.GetDamage().NewDamageEvent(target, data.GetThrower(), null, DamageCause.PROJECTILE, 10.0, false, false, false, "Throwing TNT", "Throwing TNT Direct Hit");
}
@Override
@ -581,6 +581,6 @@ public class BombLobbers extends TeamGame implements IThrown
if (event.GetCause() != DamageCause.ENTITY_EXPLOSION && event.GetCause() != DamageCause.BLOCK_EXPLOSION)
return;
event.AddKnockback("Explosion", 1.5D);
event.AddKnockback("Explosion", 1.7D);
}
}

View File

@ -8,11 +8,13 @@ import nautilus.game.arcade.game.games.lobbers.kits.perks.PerkCraftman;
import nautilus.game.arcade.kit.Kit;
import nautilus.game.arcade.kit.KitAvailability;
import nautilus.game.arcade.kit.Perk;
import nautilus.game.arcade.kit.perks.PerkDummy;
import org.bukkit.Material;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
public class KitArmorer extends Kit
{
@ -21,15 +23,18 @@ public class KitArmorer extends Kit
{
super(manager, "Armorer", KitAvailability.Gem, 2000, new String[]
{
"He uses his expert armor-making",
"skills to block excess damage!",
"",
C.cGray + "Recieve " + C.cYellow + "Full Gold Armor"
C.cGray + "He uses his expert armor-making",
C.cGray + "skills to block excess damage!"
}, new Perk[]
{
new PerkDummy("Armorer",
new String[]
{
C.cGray + "Recieve " + C.cYellow + "Full Gold Armor"
}),
new PerkCraftman()
}, EntityType.ZOMBIE,
new ItemBuilder(Material.GOLD_INGOT).build());
new ItemBuilder(Material.GOLD_HELMET).build());
}
@Override
@ -49,16 +54,15 @@ public class KitArmorer extends Kit
UtilInv.Update(player);
}
@Override
public void SpawnCustom(LivingEntity ent)
{
ent.getEquipment().setHelmet(new ItemBuilder(Material.GOLD_HELMET).build());
ent.getEquipment().setChestplate(new ItemBuilder(Material.GOLD_CHESTPLATE).build());
ent.getEquipment().setLeggings(new ItemBuilder(Material.GOLD_LEGGINGS).build());
ent.getEquipment().setBoots(new ItemBuilder(Material.GOLD_BOOTS).build());
}
@Override
public void SpawnCustom(LivingEntity entity)
{
entity.getEquipment().setChestplate(new ItemStack(Material.GOLD_CHESTPLATE));
entity.getEquipment().setLeggings(new ItemStack(Material.GOLD_LEGGINGS));
entity.getEquipment().setBoots(new ItemStack(Material.GOLD_BOOTS));
}
@Override
public void GiveItems(Player player)
{

View File

@ -1,5 +1,6 @@
package nautilus.game.arcade.game.games.lobbers.kits;
import mineplex.core.common.util.C;
import mineplex.core.itemstack.ItemBuilder;
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
import nautilus.game.arcade.ArcadeManager;
@ -8,6 +9,7 @@ import nautilus.game.arcade.kit.Kit;
import nautilus.game.arcade.kit.KitAvailability;
import nautilus.game.arcade.kit.Perk;
import nautilus.game.arcade.kit.perks.PerkDoubleJump;
import nautilus.game.arcade.kit.perks.PerkDummy;
import org.bukkit.Material;
import org.bukkit.entity.EntityType;
@ -22,11 +24,15 @@ public class KitJumper extends Kit
{
super(manager, "Jumper", KitAvailability.Free, 0, new String[]
{
"Use your jumping abilities to leap away from trouble!",
"You take no fall damage."
C.cGray + "Use your jumping abilities to leap away from trouble!"
}, new Perk[]
{
new PerkDoubleJump("Double Jump", 1.2, 1.2, false, 6000, true),
new PerkDummy("Feathered Boots",
new String[]
{
C.cGray + "You take no fall damage."
}),
new PerkCraftman()
}, EntityType.ZOMBIE, new ItemBuilder(Material.IRON_AXE).build());
}

View File

@ -13,6 +13,7 @@ import nautilus.game.arcade.game.games.lobbers.kits.perks.PerkCraftman;
import nautilus.game.arcade.kit.Kit;
import nautilus.game.arcade.kit.KitAvailability;
import nautilus.game.arcade.kit.Perk;
import nautilus.game.arcade.kit.perks.PerkDummy;
import org.bukkit.Material;
import org.bukkit.entity.EntityType;
@ -27,14 +28,16 @@ public class KitPitcher extends Kit
{
super(manager, "Pitcher", KitAvailability.Gem, 4000, new String[]
{
"He can easily pitch the perfect shot for any occasion.",
"",
C.cYellow + "Left Click" + C.cGray + " lever to " + C.cGreen + "Decrease Velocity",
C.cYellow + "Right Click" + C.cGray + " lever to " + C.cGreen + "Increase Velocity",
"Maximum Velocity of " + C.cYellow + "3.",
"Minimum Velocity of " + C.cYellow + "1.",
C.cGray + "He can easily pitch the perfect",
C.cGray + "shot for any occasion."
}, new Perk[]
{
new PerkDummy("Pitcher",
new String[]
{
C.cYellow + "Left Click" + C.cGray + " lever to " + C.cGreen + "Decrease Velocity. " + C.cGray + "Minimum of 1.",
C.cYellow + "Right Click" + C.cGray + " lever to " + C.cGreen + "Increase Velocity. " + C.cGray + "Maximum of 3.",
}),
new PerkCraftman()
}, EntityType.ZOMBIE,
new ItemBuilder(Material.LEVER).build());
@ -43,7 +46,7 @@ public class KitPitcher extends Kit
@Override
public void GiveItems(Player player)
{
player.getInventory().setItem(1, new ItemBuilder(Material.LEVER).setTitle(F.item("Velocity Selector")).setAmount(3).build());
player.getInventory().setItem(1, new ItemBuilder(Material.LEVER).setTitle(F.item("Velocity Selector")).setAmount(2).build());
}
@EventHandler
@ -112,11 +115,11 @@ public class KitPitcher extends Kit
private double getVelocity(int amount)
{
if (amount == 1)
return 1.5;
if (amount == 2)
return 1.75;
if (amount == 3)
return 2.25;
return 2.0;
}
}

View File

@ -1,5 +1,6 @@
package nautilus.game.arcade.game.games.lobbers.kits;
import mineplex.core.achievement.Achievement;
import mineplex.core.common.util.F;
import mineplex.core.itemstack.ItemBuilder;
import nautilus.game.arcade.ArcadeManager;
@ -27,6 +28,16 @@ public class KitWaller extends Kit
new PerkCraftman()
}, EntityType.ZOMBIE,
new ItemBuilder(Material.SMOOTH_BRICK).setUnbreakable(true).build());
this.setAchievementRequirements(new Achievement[]
{
Achievement.BOMB_LOBBERS_WINS,
Achievement.BOMB_LOBBERS_ULTIMATE_KILLER,
Achievement.BOMB_LOBBERS_SNIPER,
Achievement.BOMB_LOBBERS_PROFESSIONAL_LOBBER,
Achievement.BOMB_LOBBERS_EXPLOSION_PROOF,
Achievement.BOMB_LOBBERS_BLAST_PROOF
});
}
@Override
@ -36,3 +47,4 @@ public class KitWaller extends Kit
}
}

View File

@ -0,0 +1,13 @@
package nautilus.game.arcade.kit.perks;
import nautilus.game.arcade.kit.Perk;
public class PerkDummy extends Perk
{
public PerkDummy(String name, String[] perkDesc)
{
super(name, perkDesc);
}
}