Merge branch 'master' of ssh://dev.mineplex.com:7999/min/Mineplex
This commit is contained in:
commit
afee32257d
@ -70,7 +70,7 @@ public class StackerManager extends MiniPlugin implements IThrown
|
|||||||
{
|
{
|
||||||
UtilPlayer.message(player, F.main("Stacker", "You are back in the stacking games! Squeeeee!"));
|
UtilPlayer.message(player, F.main("Stacker", "You are back in the stacking games! Squeeeee!"));
|
||||||
|
|
||||||
player.getInventory().setItem(_slot, ItemStackFactory.Instance.CreateStack(Material.REDSTONE_TORCH_ON, (byte)0, 1,
|
player.getInventory().setItem(_slot, ItemStackFactory.Instance.CreateStack(Material.SLIME_BALL, (byte)0, 1,
|
||||||
C.cYellow + "Stacker" + C.cWhite + " - " + C.cGreen + "Enabled"));
|
C.cYellow + "Stacker" + C.cWhite + " - " + C.cGreen + "Enabled"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -78,7 +78,7 @@ public class StackerManager extends MiniPlugin implements IThrown
|
|||||||
_disabled.add(player);
|
_disabled.add(player);
|
||||||
UtilPlayer.message(player, F.main("Stacker", "You are no longer stackable... boring!"));
|
UtilPlayer.message(player, F.main("Stacker", "You are no longer stackable... boring!"));
|
||||||
|
|
||||||
player.getInventory().setItem(_slot, ItemStackFactory.Instance.CreateStack(Material.REDSTONE_TORCH_OFF, (byte)0, 1,
|
player.getInventory().setItem(_slot, ItemStackFactory.Instance.CreateStack(Material.MAGMA_CREAM, (byte)0, 1,
|
||||||
C.cYellow + "Stacker" + C.cWhite + " - " + C.cRed + "Disabled"));
|
C.cYellow + "Stacker" + C.cWhite + " - " + C.cRed + "Disabled"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -86,7 +86,7 @@ public class StackerManager extends MiniPlugin implements IThrown
|
|||||||
@EventHandler
|
@EventHandler
|
||||||
public void PlayerJoin(PlayerJoinEvent event)
|
public void PlayerJoin(PlayerJoinEvent event)
|
||||||
{
|
{
|
||||||
event.getPlayer().getInventory().setItem(_slot, ItemStackFactory.Instance.CreateStack(Material.REDSTONE_TORCH_ON, (byte)0, 1,
|
event.getPlayer().getInventory().setItem(_slot, ItemStackFactory.Instance.CreateStack(Material.SLIME_BALL, (byte)0, 1,
|
||||||
C.cYellow + "Stacker" + C.cWhite + " - " + C.cGreen + "Enabled"));
|
C.cYellow + "Stacker" + C.cWhite + " - " + C.cGreen + "Enabled"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
package nautilus.game.arcade.game.games.halloween;
|
package nautilus.game.arcade.game.games.halloween;
|
||||||
|
|
||||||
|
import java.io.BufferedWriter;
|
||||||
|
import java.io.FileWriter;
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
@ -23,6 +26,7 @@ import mineplex.core.common.util.UtilBlock;
|
|||||||
import mineplex.core.common.util.UtilMath;
|
import mineplex.core.common.util.UtilMath;
|
||||||
import mineplex.core.common.util.UtilServer;
|
import mineplex.core.common.util.UtilServer;
|
||||||
import mineplex.core.common.util.UtilTime;
|
import mineplex.core.common.util.UtilTime;
|
||||||
|
import mineplex.core.common.util.UtilWorld;
|
||||||
import mineplex.core.common.util.UtilTime.TimeUnit;
|
import mineplex.core.common.util.UtilTime.TimeUnit;
|
||||||
import mineplex.core.updater.UpdateType;
|
import mineplex.core.updater.UpdateType;
|
||||||
import mineplex.core.updater.event.UpdateEvent;
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
@ -234,6 +238,52 @@ public class Halloween extends SoloGame
|
|||||||
Manager.GetGame().AddGems(player, 10, "Participation", false);
|
Manager.GetGame().AddGems(player, 10, "Participation", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FileWriter fstream = null;
|
||||||
|
BufferedWriter out = null;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
fstream = new FileWriter("HalloweenHelmets.dat", true);
|
||||||
|
out = new BufferedWriter(fstream);
|
||||||
|
|
||||||
|
for (Player player : GetPlayers(false))
|
||||||
|
{
|
||||||
|
out.write(UtilTime.now() + "\t\t" + player.getName());
|
||||||
|
out.newLine();
|
||||||
|
}
|
||||||
|
|
||||||
|
out.close();
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
System.err.println("Halloween Helmet Save: " + e.getMessage());
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
if (out != null)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
out.close();
|
||||||
|
}
|
||||||
|
catch (IOException e)
|
||||||
|
{
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fstream != null)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
fstream.close();
|
||||||
|
}
|
||||||
|
catch (IOException e)
|
||||||
|
{
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
SetState(GameState.End);
|
SetState(GameState.End);
|
||||||
SetCustomWinLine("You earned Pumpkin Kings Head!");
|
SetCustomWinLine("You earned Pumpkin Kings Head!");
|
||||||
AnnounceEnd(this.GetTeamList().get(0));
|
AnnounceEnd(this.GetTeamList().get(0));
|
||||||
@ -286,20 +336,6 @@ public class Halloween extends SoloGame
|
|||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.MONITOR)
|
|
||||||
public void GemAward(CustomDamageEvent event)
|
|
||||||
{
|
|
||||||
if (event.IsCancelled())
|
|
||||||
return;
|
|
||||||
|
|
||||||
Player player = event.GetDamagerPlayer(true);
|
|
||||||
if (player == null) return;
|
|
||||||
|
|
||||||
for (int i=0 ; i<event.GetDamage() ; i++)
|
|
||||||
Manager.GetGame().AddGems(player, 0.02, "Damage", true);
|
|
||||||
}
|
|
||||||
|
|
||||||
public int GetMaxMobs()
|
public int GetMaxMobs()
|
||||||
{
|
{
|
||||||
return _maxMobs;
|
return _maxMobs;
|
||||||
|
@ -342,7 +342,6 @@ public class WorldParser
|
|||||||
out.write("MAX_Y:"+Math.max(cornerA.getBlockY(), cornerB.getBlockY()));
|
out.write("MAX_Y:"+Math.max(cornerA.getBlockY(), cornerB.getBlockY()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//Teams
|
//Teams
|
||||||
for (String team : TeamLocs.keySet())
|
for (String team : TeamLocs.keySet())
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user