Merge branch 'master' of ssh://184.154.0.242:7999/min/mineplex
This commit is contained in:
commit
8cf10afb1b
@ -7,7 +7,7 @@
|
||||
</list>
|
||||
</component>
|
||||
<component name="IdProvider" IDEtalkID="7E81636CD93857493DFE224533ECF492" />
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" assert-keyword="true" jdk-15="true" project-jdk-name="1.7" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,42 @@
|
||||
package net.minecraft.server.v1_7_R4;
|
||||
|
||||
import net.minecraft.server.v1_7_R4.ItemStack;
|
||||
import net.minecraft.server.v1_7_R4.Packet;
|
||||
import net.minecraft.server.v1_7_R4.PacketDataSerializer;
|
||||
import net.minecraft.server.v1_7_R4.PacketListener;
|
||||
import net.minecraft.server.v1_7_R4.PacketPlayOutListener;
|
||||
|
||||
public class PacketPlayOutSetSlot extends Packet {
|
||||
public int a;
|
||||
public int b;
|
||||
public ItemStack c;
|
||||
|
||||
public PacketPlayOutSetSlot() {
|
||||
}
|
||||
|
||||
public PacketPlayOutSetSlot(int i, int j, ItemStack itemstack) {
|
||||
this.a = i;
|
||||
this.b = j;
|
||||
this.c = itemstack == null?null:itemstack.cloneItemStack();
|
||||
}
|
||||
|
||||
public void a(PacketPlayOutListener packetplayoutlistener) {
|
||||
packetplayoutlistener.a(this);
|
||||
}
|
||||
|
||||
public void a(PacketDataSerializer packetdataserializer) {
|
||||
this.a = packetdataserializer.readByte();
|
||||
this.b = packetdataserializer.readShort();
|
||||
this.c = packetdataserializer.c();
|
||||
}
|
||||
|
||||
public void b(PacketDataSerializer packetdataserializer) {
|
||||
packetdataserializer.writeByte(this.a);
|
||||
packetdataserializer.writeShort(this.b);
|
||||
packetdataserializer.a(this.c);
|
||||
}
|
||||
|
||||
public void handle(PacketListener packetlistener) {
|
||||
this.a((PacketPlayOutListener)packetlistener);
|
||||
}
|
||||
}
|
Binary file not shown.
@ -98,7 +98,7 @@ public class UtilTime
|
||||
if (type == TimeUnit.DAYS) text = (num = UtilMath.trim(trim, time / 86400000d)) + " Day";
|
||||
else if (type == TimeUnit.HOURS) text = (num = UtilMath.trim(trim, time / 3600000d)) + " Hour";
|
||||
else if (type == TimeUnit.MINUTES) text = (num = UtilMath.trim(trim, time / 60000d)) + " Minute";
|
||||
else if (type == TimeUnit.SECONDS) text = (int) (num = (int) UtilMath.trim(0, time / 1000d)) + " Second";
|
||||
else if (type == TimeUnit.SECONDS) text = (num = UtilMath.trim(trim, time / 1000d)) + " Second";
|
||||
else text = (int) (num = (int) UtilMath.trim(0, time)) + " Millisecond";
|
||||
}
|
||||
|
||||
|
@ -20,11 +20,11 @@ public enum AchievementCategory
|
||||
|
||||
//Survival
|
||||
BRIDGES("The Bridges", null,
|
||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.LOSSES, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
||||
Material.IRON_PICKAXE, 0, GameCategory.SURVIVAL, "Destructor Kit"),
|
||||
|
||||
SURVIVAL_GAMES("Survival Games", null,
|
||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.LOSSES, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
||||
Material.DIAMOND_SWORD, 0, GameCategory.SURVIVAL, "Horseman Kit"),
|
||||
|
||||
MINE_STRIKE("MineStrike", null,
|
||||
@ -32,28 +32,28 @@ public enum AchievementCategory
|
||||
Material.TNT, 0, GameCategory.CLASSICS, null),
|
||||
|
||||
WIZARDS("Wizards", null,
|
||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.LOSSES, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
||||
Material.BLAZE_ROD, 0, GameCategory.SURVIVAL, "Extra Class Skills"),
|
||||
|
||||
UHC("Ultra Hardcore", null,
|
||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.LOSSES, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
||||
Material.GOLD_INGOT, 0, GameCategory.SURVIVAL, "Extra Class Skills"),
|
||||
|
||||
//Classics
|
||||
SMASH_MOBS("Super Smash Mobs", null,
|
||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.LOSSES, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
||||
Material.SKULL_ITEM, 4, GameCategory.CLASSICS, "Sheep Kit"),
|
||||
|
||||
BLOCK_HUNT("Block Hunt", null,
|
||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.LOSSES, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
||||
Material.GRASS, 0, GameCategory.CLASSICS, null),
|
||||
|
||||
MASTER_BUILDERS("Master Builders", null,
|
||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED_GAME, StatDisplay.GEMS_EARNED },
|
||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.GEMS_EARNED },
|
||||
Material.WOOD, 0, GameCategory.CLASSICS, null),
|
||||
|
||||
DRAW_MY_THING("Draw My Thing", null,
|
||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED_GAME, StatDisplay.GEMS_EARNED },
|
||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.GEMS_EARNED },
|
||||
Material.BOOK_AND_QUILL, 0, GameCategory.CLASSICS, null),
|
||||
|
||||
CASTLE_SIEGE("Castle Siege", null,
|
||||
@ -70,23 +70,23 @@ public enum AchievementCategory
|
||||
|
||||
//Arcade
|
||||
DRAGONS("Dragons", null,
|
||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED_GAME, StatDisplay.GEMS_EARNED },
|
||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.GEMS_EARNED },
|
||||
Material.ENDER_STONE, 0, GameCategory.ARCADE, null),
|
||||
|
||||
DRAGON_ESCAPE("Dragon Escape", null,
|
||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED_GAME, StatDisplay.GEMS_EARNED },
|
||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.GEMS_EARNED },
|
||||
Material.DRAGON_EGG, 0, GameCategory.ARCADE, null),
|
||||
|
||||
SHEEP_QUEST("Sheep Quest", null,
|
||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.LOSSES, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
||||
Material.WOOL, 0, GameCategory.ARCADE, null),
|
||||
|
||||
SNEAKY_ASSASSINS("Sneaky Assassins", null,
|
||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.LOSSES, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
||||
Material.INK_SACK, 0, GameCategory.ARCADE, null),
|
||||
|
||||
ONE_IN_THE_QUIVER("One in the Quiver", null,
|
||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.LOSSES, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
||||
Material.BOW, 0, GameCategory.ARCADE, null),
|
||||
|
||||
SUPER_PAINTBALL("Super Paintball", null,
|
||||
@ -98,27 +98,27 @@ public enum AchievementCategory
|
||||
Material.HARD_CLAY, 14, GameCategory.ARCADE, null),
|
||||
|
||||
RUNNER("Runner", null,
|
||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.LOSSES, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
||||
Material.LEATHER_BOOTS, 0, GameCategory.ARCADE, null),
|
||||
|
||||
SPLEEF("Super Spleef", null,
|
||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.LOSSES, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
||||
Material.IRON_SPADE, 0, GameCategory.ARCADE, null),
|
||||
|
||||
DEATH_TAG("Death Tag", null,
|
||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.LOSSES, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
||||
Material.SKULL_ITEM, 0, GameCategory.ARCADE, null),
|
||||
|
||||
SNAKE("Snake", null,
|
||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.LOSSES, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
||||
Material.WOOL, 4, GameCategory.ARCADE, null),
|
||||
|
||||
BACON_BRAWL("Bacon Brawl", null,
|
||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.LOSSES, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
||||
Material.PORK, 0, GameCategory.ARCADE, null),
|
||||
|
||||
MICRO_BATTLE("Micro Battle", null,
|
||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.LOSSES, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
||||
Material.LAVA, 0, GameCategory.ARCADE, null),
|
||||
|
||||
;
|
||||
|
@ -4,7 +4,7 @@ package mineplex.core.achievement;
|
||||
* The purpose of extracting stats to this class is so we can display stats that are a combination
|
||||
* of different stat values. For example, since we don't have a specific stat for games played of a game,
|
||||
* we can use this class to display the stat "Games Played" that sums up "Wins" and "Losses"
|
||||
* See: StatDisplay.GAMES_PLAYED_GAME
|
||||
* See: StatDisplay.GAMES_PLAYED
|
||||
*/
|
||||
public class StatDisplay
|
||||
{
|
||||
@ -39,6 +39,6 @@ public class StatDisplay
|
||||
public static final StatDisplay DEATHS = new StatDisplay("Deaths");
|
||||
public static final StatDisplay GEMS_EARNED = new StatDisplay("Gems Earned", "GemsEarned");
|
||||
public static final StatDisplay TIME_IN_GAME = new StatDisplay("Time In Game", "TimeInGame");
|
||||
public static final StatDisplay GAMES_PLAYED_GAME = new StatDisplay("Games Played", "Wins", "Losses");
|
||||
public static final StatDisplay GAMES_PLAYED = new StatDisplay("Games Played", "Wins", "Losses");
|
||||
|
||||
}
|
||||
|
@ -417,7 +417,7 @@ public class CombatManager extends MiniPlugin
|
||||
CombatDeathEvent deathEvent = new CombatDeathEvent(event, Get(event.getEntity().getName()), log);
|
||||
UtilServer.getServer().getPluginManager().callEvent(deathEvent);
|
||||
|
||||
|
||||
//XXX Death MSG
|
||||
if (deathEvent.GetBroadcastType() == DeathMessageType.Detailed || deathEvent.GetBroadcastType() == DeathMessageType.Absolute)
|
||||
{
|
||||
//Display Simple
|
||||
|
@ -1,5 +1,7 @@
|
||||
package nautilus.game.arcade.game.games;
|
||||
|
||||
import java.util.Comparator;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class GameScore
|
||||
@ -17,4 +19,16 @@ public class GameScore
|
||||
{
|
||||
return Player;
|
||||
}
|
||||
|
||||
public static Comparator<GameScore> SCORE_COMPARATOR = new Comparator<GameScore>()
|
||||
{
|
||||
@Override
|
||||
public int compare(GameScore o1, GameScore o2)
|
||||
{
|
||||
if (o1.Score == o2.Score)
|
||||
return 0;
|
||||
|
||||
return o1.Score > o2.Score ? 1 : -1;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -31,6 +31,7 @@ import org.bukkit.event.entity.EntityExplodeEvent;
|
||||
import org.bukkit.event.entity.ItemSpawnEvent;
|
||||
import org.bukkit.event.inventory.PrepareItemCraftEvent;
|
||||
import org.bukkit.event.player.PlayerBucketEmptyEvent;
|
||||
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.event.player.PlayerPickupItemEvent;
|
||||
import org.bukkit.inventory.CraftingInventory;
|
||||
@ -1626,4 +1627,20 @@ public class Bridge extends TeamGame implements OreObsfucation
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public double GetKillsGems(Player killer, Player killed, boolean assist)
|
||||
{
|
||||
if (assist)
|
||||
return 3;
|
||||
else
|
||||
return 12;
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void toggleOre(PlayerCommandPreprocessEvent event)
|
||||
{
|
||||
if (event.getPlayer().isOp() && event.getMessage().contains("/oretoggle"))
|
||||
_ore.ToggleVisibility();
|
||||
}
|
||||
}
|
||||
|
@ -63,6 +63,7 @@ import org.bukkit.event.vehicle.VehicleCreateEvent;
|
||||
import org.bukkit.event.vehicle.VehicleDamageEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import mineplex.core.common.Rank;
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.NautHashMap;
|
||||
@ -91,6 +92,7 @@ import nautilus.game.arcade.GameType;
|
||||
import nautilus.game.arcade.events.GameStateChangeEvent;
|
||||
import nautilus.game.arcade.events.PlayerPrepareTeleportEvent;
|
||||
import nautilus.game.arcade.game.SoloGame;
|
||||
import nautilus.game.arcade.game.Game.GameState;
|
||||
import nautilus.game.arcade.game.games.build.gui.MobShop;
|
||||
import nautilus.game.arcade.game.games.build.gui.OptionsShop;
|
||||
import nautilus.game.arcade.game.games.build.kits.KitBuilder;
|
||||
@ -107,8 +109,8 @@ public class Build extends SoloGame
|
||||
private int _buildGameState = 0;
|
||||
private long _buildStateTime = 0;
|
||||
private long _buildTime = 300000;
|
||||
private long _voteTime = 12000;
|
||||
private long _viewTime = 16000;
|
||||
private long _voteTime = 14000;
|
||||
private long _viewTime = 18000;
|
||||
private BuildData _viewData = null;
|
||||
|
||||
private int _countdownTimerState = 0;
|
||||
@ -372,7 +374,27 @@ public class Build extends SoloGame
|
||||
}
|
||||
}
|
||||
|
||||
if (!hasDecentVote)
|
||||
String result = null;
|
||||
|
||||
//More than half think its abusive
|
||||
if (GetPlayers(true).size() >= 4 && _viewData.AbuseVotes.size() >= (double)(GetPlayers(true).size() - 1) / 2d)
|
||||
{
|
||||
result = C.cWhite + "Inappropriate Build";
|
||||
_viewData.setAbusive();
|
||||
|
||||
//Record Abuse
|
||||
AddStat(_viewData.Player, "Build Draw Abuse", 1, false, true);
|
||||
|
||||
//Announce
|
||||
Announce(C.cWhite + C.Bold + _viewData.Player.getName() + " has been reported for an inappropriate build.", false);
|
||||
_viewData.Spawn.getWorld().playSound(_viewData.Spawn, Sound.ENDERDRAGON_GROWL, 10f, 1f);
|
||||
|
||||
UtilPlayer.message(_viewData.Player, C.cWhite + C.Bold + "Inappropriate Builds can result in a Master Buildres ban.");
|
||||
|
||||
//Return to Hub
|
||||
getArcadeManager().GetPortal().sendPlayerToServer(_viewData.Player, "Lobby");
|
||||
}
|
||||
else if (!hasDecentVote)
|
||||
{
|
||||
Manager.GetExplosion().BlockExplosion(_viewData.Blocks, _viewData.Spawn, false);
|
||||
|
||||
@ -380,10 +402,12 @@ public class Build extends SoloGame
|
||||
_viewData.Spawn.getWorld().playSound(_viewData.Spawn, Sound.EXPLODE, 3f, 1f);
|
||||
UtilParticle.PlayParticle(ParticleType.HUGE_EXPLOSION, _viewData.Spawn, 4f, 4f, 4f, 0, 10,
|
||||
ViewDist.MAX, UtilServer.getPlayers());
|
||||
|
||||
result = C.cRed + "Failure";
|
||||
}
|
||||
|
||||
//Announce Builder
|
||||
UtilTextMiddle.display(hasDecentVote ? null : C.cRed + "Failure", "Built by: " + C.Bold + _viewData.Player.getName(), 0, 80, 5);
|
||||
UtilTextMiddle.display(result, "Built by: " + C.Bold + _viewData.Player.getName(), 0, 80, 5);
|
||||
}
|
||||
|
||||
_viewData.Judged = true;
|
||||
@ -431,6 +455,8 @@ public class Build extends SoloGame
|
||||
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(160, (byte)3, 1, C.cAqua + C.Bold + "Amazing"));
|
||||
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(160, (byte)10, 1, C.cPurple + C.Bold + "WOW! EVERYTHING IS AWESOME!"));
|
||||
|
||||
player.getInventory().setItem(8, ItemStackFactory.Instance.CreateStack(Material.BOOK, (byte)0, 1, C.cWhite + C.Bold + "Report Inappropriate Build"));
|
||||
|
||||
UtilTextMiddle.display(null, C.cYellow + "Click to Vote", 0, 60, 5, player);
|
||||
}
|
||||
|
||||
@ -711,9 +737,6 @@ public class Build extends SoloGame
|
||||
if (!IsAlive(event.getPlayer()))
|
||||
return;
|
||||
|
||||
if (!UtilGear.isMat(event.getPlayer().getItemInHand(), Material.STAINED_GLASS_PANE))
|
||||
return;
|
||||
|
||||
if (!UtilEvent.isAction(event, ActionType.R) && !UtilEvent.isAction(event, ActionType.L))
|
||||
return;
|
||||
|
||||
@ -726,6 +749,19 @@ public class Build extends SoloGame
|
||||
if (!UtilTime.elapsed(_buildStateTime, 1500))
|
||||
return;
|
||||
|
||||
//Vote Abuse
|
||||
if (UtilGear.isMat(event.getPlayer().getItemInHand(), Material.BOOK))
|
||||
{
|
||||
_viewData.addAbuseVote(event.getPlayer());
|
||||
UtilTextMiddle.display(null, C.cWhite + C.Bold + "Inappropriate Build", 0, 40, 5, event.getPlayer());
|
||||
UtilPlayer.message(event.getPlayer(), C.cWhite + C.Bold + "You reported " + _viewData.Player.getName() + " for inappropriate build!");
|
||||
UtilPlayer.message(event.getPlayer(), C.cWhite + C.Bold + "Thanks for helping us keep Master Builders clean!");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!UtilGear.isMat(event.getPlayer().getItemInHand(), Material.STAINED_GLASS_PANE))
|
||||
return;
|
||||
|
||||
if (!_votes.containsKey(event.getPlayer()))
|
||||
_votes.put(event.getPlayer(), new NautHashMap<Player, Integer>());
|
||||
|
||||
@ -1179,12 +1215,12 @@ public class Build extends SoloGame
|
||||
if (_buildGameState == 0)
|
||||
{
|
||||
Scoreboard.Write(C.cYellow + C.Bold + "Build Time");
|
||||
Scoreboard.Write(UtilTime.MakeStr(Math.max(0, _buildTime - (System.currentTimeMillis() - this.GetStateTime())), 1));
|
||||
Scoreboard.Write(UtilTime.MakeStr(Math.max(0, _buildTime - (System.currentTimeMillis() - this.GetStateTime())), 0));
|
||||
}
|
||||
else if (_buildGameState == 2)
|
||||
{
|
||||
Scoreboard.Write(C.cYellow + C.Bold + "Vote Time");
|
||||
Scoreboard.Write(UtilTime.MakeStr(Math.max(0, _voteTime - (System.currentTimeMillis() - _buildStateTime)), 1));
|
||||
Scoreboard.Write(UtilTime.MakeStr(Math.max(0, _voteTime - (System.currentTimeMillis() - _buildStateTime)), 0));
|
||||
|
||||
// if (_viewData != null)
|
||||
// {
|
||||
@ -1441,4 +1477,22 @@ public class Build extends SoloGame
|
||||
|
||||
return GetTeamList().get(0).GetSpawn();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void kickAbusers(UpdateEvent event)
|
||||
{
|
||||
if (event.getType() != UpdateType.SLOW)
|
||||
return;
|
||||
|
||||
for (Player player : UtilServer.getPlayers())
|
||||
{
|
||||
if (Manager.GetStatsManager().Get(player).getStat("Global.Build Draw Abuse") >= 3)
|
||||
{
|
||||
UtilPlayer.message(player, C.cRed + C.Bold + "You have been flagged as an Inappropriate Builder!");
|
||||
UtilPlayer.message(player, C.cRed + C.Bold + "As a result, you are banned from this game.");
|
||||
player.playSound(player.getLocation(), Sound.ENDERDRAGON_GROWL, 10f, 1f);
|
||||
getArcadeManager().GetPortal().sendPlayerToServer(player, "Lobby");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -52,6 +52,9 @@ public class BuildData
|
||||
|
||||
public int Time = 6000;
|
||||
|
||||
public HashSet<String> AbuseVotes = new HashSet<String>();
|
||||
public boolean IsAbusive = false;
|
||||
|
||||
// This is used to show the player to use their inventory to grab items
|
||||
public boolean ClickedInventory = false;
|
||||
|
||||
@ -307,6 +310,9 @@ public class BuildData
|
||||
|
||||
public void addPoints(double d)
|
||||
{
|
||||
if (IsAbusive)
|
||||
return;
|
||||
|
||||
_totalPoints += d;
|
||||
}
|
||||
|
||||
@ -319,4 +325,14 @@ public class BuildData
|
||||
{
|
||||
_totalPoints = 0;
|
||||
}
|
||||
|
||||
public void addAbuseVote(Player voter)
|
||||
{
|
||||
AbuseVotes.add(voter.getName());
|
||||
}
|
||||
|
||||
public void setAbusive()
|
||||
{
|
||||
IsAbusive = true;
|
||||
}
|
||||
}
|
||||
|
@ -389,12 +389,7 @@ public class DeathTag extends SoloGame
|
||||
{
|
||||
if (GetState().ordinal() >= GameState.End.ordinal())
|
||||
{
|
||||
List<Player> places = _chasers.GetPlayers(true);
|
||||
|
||||
if (places.isEmpty() || !places.get(0).isOnline())
|
||||
return Arrays.asList();
|
||||
else
|
||||
return Arrays.asList(places.get(0));
|
||||
return _chasers.GetPlayers(true);
|
||||
}
|
||||
else
|
||||
return null;
|
||||
|
@ -3,6 +3,7 @@ package nautilus.game.arcade.game.games.draw;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
@ -650,18 +651,7 @@ public class Draw extends SoloGame
|
||||
|
||||
private void SortScores()
|
||||
{
|
||||
for (int i=0 ; i<_ranks.size() ; i++)
|
||||
{
|
||||
for (int j=_ranks.size()-1 ; j>0 ; j--)
|
||||
{
|
||||
if (_ranks.get(j).Score > _ranks.get(j-1).Score)
|
||||
{
|
||||
GameScore temp = _ranks.get(j);
|
||||
_ranks.set(j, _ranks.get(j-1));
|
||||
_ranks.set(j-1, temp);
|
||||
}
|
||||
}
|
||||
}
|
||||
Collections.sort(_ranks, GameScore.SCORE_COMPARATOR);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -688,14 +678,22 @@ public class Draw extends SoloGame
|
||||
@Override
|
||||
public List<Player> getLosers()
|
||||
{
|
||||
List<Player> losers = getWinners();
|
||||
if (GetState().ordinal() >= GameState.End.ordinal())
|
||||
{
|
||||
SortScores();
|
||||
|
||||
if (losers == null)
|
||||
//Set Places
|
||||
ArrayList<Player> places = new ArrayList<Player>();
|
||||
for (int i = 0; i < _ranks.size(); i++)
|
||||
places.add(i, _ranks.get(i).Player);
|
||||
|
||||
if (places.size() > 0)
|
||||
places.remove(0);
|
||||
|
||||
return places;
|
||||
}
|
||||
else
|
||||
return null;
|
||||
|
||||
losers.remove(0);
|
||||
|
||||
return losers;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -11,6 +11,7 @@ import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.block.BlockBreakEvent;
|
||||
import org.bukkit.event.block.BlockPlaceEvent;
|
||||
|
||||
import mineplex.core.common.util.MapUtil;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
@ -178,7 +179,7 @@ public class Micro extends TeamGame
|
||||
return;
|
||||
|
||||
for (Block block : _glass)
|
||||
block.setType(Material.AIR);
|
||||
MapUtil.QuickChangeBlockAt(block.getLocation(), Material.AIR);
|
||||
|
||||
_glass.clear();
|
||||
}
|
||||
|
@ -245,8 +245,8 @@ public class MineStrike extends TeamGame
|
||||
C.cAqua + "SWAT" + C.cWhite + " Defend the Bomb Sites",
|
||||
C.cAqua + "SWAT" + C.cWhite + " Kill the Terrorists",
|
||||
" ",
|
||||
C.cRed + "Al'Jaha" + C.cWhite + " Plant the Bomb at Bomb Site",
|
||||
C.cRed + "Al'Jaha" + C.cWhite + " Kill the Counter-Terrorists",
|
||||
C.cRed + "Bombers" + C.cWhite + " Plant the Bomb at Bomb Site",
|
||||
C.cRed + "Bombers" + C.cWhite + " Kill the Counter-Terrorists",
|
||||
});
|
||||
|
||||
_shopManager = new ShopManager(this);
|
||||
@ -313,7 +313,7 @@ public class MineStrike extends TeamGame
|
||||
this.GetTeamList().get(0).SetName("SWAT");
|
||||
|
||||
this.GetTeamList().get(1).SetColor(ChatColor.RED);
|
||||
this.GetTeamList().get(1).SetName("Al'Jaha");
|
||||
this.GetTeamList().get(1).SetName("Bombers");
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
@ -1026,7 +1026,10 @@ public class SurvivalGames extends SoloGame
|
||||
@Override
|
||||
public double GetKillsGems(Player killer, Player killed, boolean assist)
|
||||
{
|
||||
return 4;
|
||||
if (assist)
|
||||
return 3;
|
||||
else
|
||||
return 12;
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@ -2261,5 +2264,4 @@ public class SurvivalGames extends SoloGame
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -115,13 +115,11 @@ public class SpectatorPage extends ShopPageBase<CompassAddon, SpectatorShop>
|
||||
|
||||
setItem(woolSlot, getTeamItem(team, teamPlayers.size()));
|
||||
|
||||
int startPlayerIndex = row * 8;
|
||||
int count = 0;
|
||||
for (int playerIndex = startPlayerIndex; playerIndex < teamPlayers.size() && count < 8; playerIndex++)
|
||||
int playerIndex = row * 8;
|
||||
for (int i = 0; i < 8 && playerIndex < teamPlayers.size(); i++, playerIndex++)
|
||||
{
|
||||
count++;
|
||||
Player other = teamPlayers.get(playerIndex);
|
||||
int slot = woolSlot + 1 + playerIndex;
|
||||
int slot = woolSlot + 1 + i;
|
||||
|
||||
// TODO Need to handle too many players in a better way
|
||||
if (slot >= getSize())
|
||||
|
@ -98,7 +98,7 @@ public class PerkIronHook extends Perk implements IThrown
|
||||
|
||||
//Damage Event
|
||||
Manager.GetDamage().NewDamageEvent(target, player, null,
|
||||
DamageCause.CUSTOM, velocity * 8, false, true, false,
|
||||
DamageCause.CUSTOM, velocity * 4, false, true, false,
|
||||
player.getName(), GetName());
|
||||
|
||||
//Inform
|
||||
|
@ -73,7 +73,7 @@ public class IdleManager implements Listener
|
||||
|
||||
if (_yaw.get(player) == player.getLocation().getYaw())
|
||||
{
|
||||
if (UtilTime.elapsed(_idle.get(player), 120000))
|
||||
if (UtilTime.elapsed(_idle.get(player), getArcadeManager().GetGame().IsLive() ? 240000 : 120000))
|
||||
{
|
||||
if (getArcadeManager().GetGame().GetState() != GameState.Recruit && !getArcadeManager().GetGame().IsAlive(player))
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user