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

This commit is contained in:
Jonathan Williams 2015-01-11 00:42:55 -08:00
commit ac709d09ce
9 changed files with 75 additions and 46 deletions

View File

@ -74,6 +74,11 @@ public class PetPage extends ShopPageBase<CosmeticManager, CosmeticShop>
itemLore.add(ChatColor.RESET + C.cYellow + "Earned by defeating the Pumpkin King");
itemLore.add(ChatColor.RESET + C.cYellow + "in the 2014 Christmas Chaos Event.");
}
if (pet.GetPetType() == EntityType.WITHER)
{
itemLore.add(C.cBlack);
itemLore.add(ChatColor.RESET + C.cYellow + "Unlocked with Legend Rank");
}
}
//Owned

View File

@ -737,38 +737,38 @@ public class HubManager extends MiniClientPlugin<HubClient>
if (_scoreboardTick != 0)
return;
int bestPig = 0;
for (Player player : UtilServer.getPlayers())
{
if (player.getVehicle() != null)
continue;
int count = 0;
Entity ent = player;
while (ent.getPassenger() != null)
{
ent = ent.getPassenger();
count++;
}
if (count > bestPig)
{
_pigStacker = player.getName();
bestPig = count;
}
}
if (bestPig == 0)
{
_pigStacker = "0 - Nobody";
}
else
{
_pigStacker = bestPig + " - " + _pigStacker;
if (_pigStacker.length() > 16)
_pigStacker = _pigStacker.substring(0, 16);
}
// int bestPig = 0;
// for (Player player : UtilServer.getPlayers())
// {
// if (player.getVehicle() != null)
// continue;
//
// int count = 0;
//
// Entity ent = player;
// while (ent.getPassenger() != null)
// {
// ent = ent.getPassenger();
// count++;
// }
//
// if (count > bestPig)
// {
// _pigStacker = player.getName();
// bestPig = count;
// }
// }
// if (bestPig == 0)
// {
// _pigStacker = "0 - Nobody";
// }
// else
// {
// _pigStacker = bestPig + " - " + _pigStacker;
//
// if (_pigStacker.length() > 16)
// _pigStacker = _pigStacker.substring(0, 16);
// }
for (Player player : UtilServer.getPlayers())
{
@ -789,10 +789,8 @@ public class HubManager extends MiniClientPlugin<HubClient>
int line = 15;
//Stacker
obj.getScore(C.cAqua + C.Bold + "Stacker").setScore(line--);
player.getScoreboard().resetScores(Get(player).BestPig);
Get(player).BestPig = _pigStacker;
obj.getScore(Get(player).BestPig).setScore(line--);
obj.getScore(C.cAqua + C.Bold + "Server").setScore(line--);
obj.getScore(GetPlugin().getConfig().getString("serverstatus.name")).setScore(line--);
//Space
obj.getScore(" ").setScore(line--);

View File

@ -24,6 +24,7 @@ public abstract class TeamGame extends Game
private NautHashMap<String, Long> _rejoinTime = new NautHashMap<String, Long>();
protected NautHashMap<String, GameTeam> RejoinTeam = new NautHashMap<String, GameTeam>();
protected NautHashMap<String, Kit> RejoinKit = new NautHashMap<String, Kit>();
protected NautHashMap<String, Double> RejoinHealth = new NautHashMap<String, Double>();
protected long RejoinTime = 120000;
@ -80,6 +81,8 @@ public abstract class TeamGame extends Game
if (GetKit(player) != null)
RejoinKit.put(player.getName(), GetKit(player));
RejoinHealth.put(player.getName(), player.getHealth());
GetLocationStore().put(player.getName(), player.getLocation());
//Announcement
@ -105,6 +108,9 @@ public abstract class TeamGame extends Game
if (kit != null)
_playerKit.put(event.getPlayer(), kit);
if (RejoinHealth.containsKey(event.getPlayer().getName()))
event.getPlayer().setHealth(RejoinHealth.remove(event.getPlayer().getName()));
return;
}
@ -142,6 +148,7 @@ public abstract class TeamGame extends Game
Announce(team.GetColor() + C.Bold + name + " did not reconnect in time!", false);
RejoinKit.remove(name);
RejoinHealth.remove(name);
}
}

View File

@ -49,8 +49,8 @@ public class KitWitherSkeleton extends SmashKit
new String[]
{
ChatColor.RESET + "Launch a Wither Skull forwards, hold",
ChatColor.RESET + "block to guide the missile! Release",
ChatColor.RESET + "block to detonate it midair.",
ChatColor.RESET + "block to guide the missile!",
ChatColor.RESET + "Detonates on collision.",
}));
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.IRON_AXE, (byte)0, 1,

View File

@ -13,6 +13,7 @@ import org.bukkit.Sound;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftArrow;
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftPlayer;
import org.bukkit.entity.Arrow;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
@ -24,9 +25,9 @@ import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
import org.bukkit.event.entity.EntityShootBowEvent;
import org.bukkit.event.entity.PlayerDeathEvent;
import org.bukkit.event.entity.ProjectileHitEvent;
import net.minecraft.server.v1_7_R4.EntityArrow;
import net.minecraft.server.v1_7_R4.Item;
import mineplex.core.common.util.C;
import mineplex.core.common.util.F;
import mineplex.core.common.util.MapUtil;
@ -274,7 +275,9 @@ public class TurfForts extends TeamGame
if (!_fight)
{
UtilPlayer.message(event.getEntity(), F.main("Game", "You cannot attack during Build Time!"));
event.getProjectile().remove();
event.setCancelled(true);
((Player) event.getEntity()).updateInventory();
}
}
@ -599,6 +602,9 @@ public class TurfForts extends TeamGame
{
for (Player player : team.GetPlayers(true))
{
if (((CraftPlayer) player).getHandle().spectating)
continue;
Block block = player.getLocation().getBlock().getRelative(BlockFace.DOWN);
while (block.getTypeId() != 159 && block.getY() > 0)
block = block.getRelative(BlockFace.DOWN);

View File

@ -461,7 +461,7 @@ public class UHC extends TeamGame
if (event.getBlock().getX() >= -16 &&
event.getBlock().getX() <= 16 &&
event.getBlock().getZ() >= -16 &&
event.getBlock().getZ() >= 16 &&
event.getBlock().getZ() <= 16 &&
event.getBlock().getY() >= _yMax)
{
UtilPlayer.message(event.getPlayer(), F.main("Game", "You cannot build this high up."));

View File

@ -56,7 +56,7 @@ public class PerkWolf extends Perk
C.cGray + "Attacks give +1 Damage for 3 seconds. Stacks.",
C.cYellow + "Right-Click" + C.cGray + " with Axe to use " + C.cGreen + "Cub Tackle",
C.cYellow + "Right-Click" + C.cGray + " with Spade to use " + C.cGreen + "Wolf Strike",
C.cGray + "Wolf Strike deals 200% Knockback to tackled opponents.",
C.cGray + "Wolf Strike deals 300% Knockback to tackled opponents.",
});
}

View File

@ -964,7 +964,7 @@ public class GameLobbyManager implements Listener, IPacketHandler
objective.getScore(" ").setScore(line--);
objective.getScore(C.cYellow + "Players").setScore(line--);
objective.getScore(C.cYellow + C.Bold + "Players").setScore(line--);
// Remove Old
entry.getValue().resetScores(_oldPlayerCount + "/" + _oldMaxPlayerCount);
@ -1014,10 +1014,16 @@ public class GameLobbyManager implements Listener, IPacketHandler
_gemMap.put(entry.getKey(), Manager.GetDonation().Get(entry.getKey().getName()).GetGems());
//Server
objective.getScore(" ").setScore(line--);
objective.getScore(C.cAqua + C.Bold + "Server").setScore(line--);
objective.getScore(Manager.GetPlugin().getConfig().getString("serverstatus.name")).setScore(line--);
//ELO
if (Manager.GetGame() != null && Manager.GetGame().EloRanking)
{
objective.getScore(" ").setScore(line--);
objective.getScore(C.cYellow + C.Bold + "Elo").setScore(line--);
objective.getScore(C.cPurple + C.Bold + "Elo").setScore(line--);
// Remove old
entry.getValue().resetScores(_eloMap.get(entry.getKey()) + " ");

View File

@ -143,9 +143,16 @@ public class GameLootManager implements Listener
if (Manager.GetClients().Get(player).GetRank().Has(Rank.ULTRA))
{
if (Manager.GetClients().Get(player).GetRank().Has(Rank.HERO))
{
if (Manager.GetClients().Get(player).GetRank().Has(Rank.LEGEND))
{
chance *= 1.6;
}
else
{
chance *= 1.4;
}
}
else
{
chance *= 1.2;