Challenge refactoring, move challenges to new package.
This commit is contained in:
parent
cb8b180c2f
commit
60dfce4612
@ -13,6 +13,7 @@ import org.bukkit.event.Listener;
|
|||||||
import org.bukkit.event.player.PlayerMoveEvent;
|
import org.bukkit.event.player.PlayerMoveEvent;
|
||||||
import org.bukkit.potion.PotionEffectType;
|
import org.bukkit.potion.PotionEffectType;
|
||||||
|
|
||||||
|
import nautilus.game.arcade.game.games.mineware.challenge.Challenge;
|
||||||
import net.minecraft.server.v1_8_R3.EntityPlayer;
|
import net.minecraft.server.v1_8_R3.EntityPlayer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -26,7 +27,7 @@ public class AntiHackFix implements Listener
|
|||||||
|
|
||||||
public AntiHackFix(Challenge challenge)
|
public AntiHackFix(Challenge challenge)
|
||||||
{
|
{
|
||||||
_host = challenge.Host;
|
_host = challenge.getHost();
|
||||||
_challenge = challenge;
|
_challenge = challenge;
|
||||||
|
|
||||||
Bukkit.getPluginManager().registerEvents(this, _host.getArcadeManager().getPlugin());
|
Bukkit.getPluginManager().registerEvents(this, _host.getArcadeManager().getPlugin());
|
||||||
|
@ -74,40 +74,43 @@ import nautilus.game.arcade.events.GameStateChangeEvent;
|
|||||||
import nautilus.game.arcade.game.GameTeam;
|
import nautilus.game.arcade.game.GameTeam;
|
||||||
import nautilus.game.arcade.game.GameTeam.PlayerState;
|
import nautilus.game.arcade.game.GameTeam.PlayerState;
|
||||||
import nautilus.game.arcade.game.TeamGame;
|
import nautilus.game.arcade.game.TeamGame;
|
||||||
import nautilus.game.arcade.game.games.mineware.challenges.ChallengeAnvilDance;
|
import nautilus.game.arcade.game.games.mineware.challenge.Challenge;
|
||||||
import nautilus.game.arcade.game.games.mineware.challenges.ChallengeArrowRampage;
|
import nautilus.game.arcade.game.games.mineware.challenge.ChallengeType;
|
||||||
import nautilus.game.arcade.game.games.mineware.challenges.ChallengeBlockLobbers;
|
import nautilus.game.arcade.game.games.mineware.challenge.other.ChallengeSeperateRooms;
|
||||||
import nautilus.game.arcade.game.games.mineware.challenges.ChallengeBouncingBlock;
|
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeAnvilDance;
|
||||||
import nautilus.game.arcade.game.games.mineware.challenges.ChallengeBuildRace;
|
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeArrowRampage;
|
||||||
import nautilus.game.arcade.game.games.mineware.challenges.ChallengeChestLoot;
|
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeBlockLobbers;
|
||||||
import nautilus.game.arcade.game.games.mineware.challenges.ChallengeCloudFall;
|
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeBouncingBlock;
|
||||||
import nautilus.game.arcade.game.games.mineware.challenges.ChallengeDogsVersusCats;
|
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeBuildRace;
|
||||||
import nautilus.game.arcade.game.games.mineware.challenges.ChallengeDragonEgg;
|
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeCloudFall;
|
||||||
import nautilus.game.arcade.game.games.mineware.challenges.ChallengeFallingBlocks;
|
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeDiamondSeeker;
|
||||||
import nautilus.game.arcade.game.games.mineware.challenges.ChallengeFastFood;
|
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeDogsVersusCats;
|
||||||
import nautilus.game.arcade.game.games.mineware.challenges.ChallengeFishingDay;
|
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeDragonEgg;
|
||||||
import nautilus.game.arcade.game.games.mineware.challenges.ChallengeInfestation;
|
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeFallingBlocks;
|
||||||
import nautilus.game.arcade.game.games.mineware.challenges.ChallengeKangarooJump;
|
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeFastFood;
|
||||||
import nautilus.game.arcade.game.games.mineware.challenges.ChallengeKingOfTheHill;
|
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeFishingDay;
|
||||||
import nautilus.game.arcade.game.games.mineware.challenges.ChallengeLavaRun;
|
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeInfestation;
|
||||||
import nautilus.game.arcade.game.games.mineware.challenges.ChallengeMilkACow;
|
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeKangarooJump;
|
||||||
import nautilus.game.arcade.game.games.mineware.challenges.ChallengeMineADiamond;
|
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeKingOfTheHill;
|
||||||
import nautilus.game.arcade.game.games.mineware.challenges.ChallengeMinecartDance;
|
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeLavaRun;
|
||||||
import nautilus.game.arcade.game.games.mineware.challenges.ChallengeMiniOneInTheQuiver;
|
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeMilkACow;
|
||||||
import nautilus.game.arcade.game.games.mineware.challenges.ChallengeNavigateMaze;
|
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeMineADiamond;
|
||||||
import nautilus.game.arcade.game.games.mineware.challenges.ChallengePickASide;
|
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeMinecartDance;
|
||||||
import nautilus.game.arcade.game.games.mineware.challenges.ChallengePunchThePig;
|
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeMiniOneInTheQuiver;
|
||||||
import nautilus.game.arcade.game.games.mineware.challenges.ChallengeRedLightGreenLight;
|
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeNavigateMaze;
|
||||||
import nautilus.game.arcade.game.games.mineware.challenges.ChallengeReverseTag;
|
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengePickASide;
|
||||||
import nautilus.game.arcade.game.games.mineware.challenges.ChallengeRushPush;
|
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengePunchThePig;
|
||||||
import nautilus.game.arcade.game.games.mineware.challenges.ChallengeShootChickens;
|
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeRedLightGreenLight;
|
||||||
import nautilus.game.arcade.game.games.mineware.challenges.ChallengeSmashOff;
|
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeReverseTag;
|
||||||
import nautilus.game.arcade.game.games.mineware.challenges.ChallengeStandOnColor;
|
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeRushPush;
|
||||||
import nautilus.game.arcade.game.games.mineware.challenges.ChallengeTntLauncher;
|
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeShootChickens;
|
||||||
import nautilus.game.arcade.game.games.mineware.challenges.ChallengeTreasureDigger;
|
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeSmashOff;
|
||||||
import nautilus.game.arcade.game.games.mineware.challenges.ChallengeVolleyPig;
|
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeStandOnColor;
|
||||||
import nautilus.game.arcade.game.games.mineware.challenges.ChallengeWaterHorror;
|
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeTntLauncher;
|
||||||
import nautilus.game.arcade.game.games.mineware.challenges.ChallengeWaveCrush;
|
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeTreasureDigger;
|
||||||
|
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeVolleyPig;
|
||||||
|
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeWaterHorror;
|
||||||
|
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeWaveCrush;
|
||||||
import nautilus.game.arcade.game.games.mineware.effect.ChickenAttack;
|
import nautilus.game.arcade.game.games.mineware.effect.ChickenAttack;
|
||||||
import nautilus.game.arcade.game.games.mineware.effect.DeathEffect;
|
import nautilus.game.arcade.game.games.mineware.effect.DeathEffect;
|
||||||
import nautilus.game.arcade.game.games.mineware.effect.DeathEffectData;
|
import nautilus.game.arcade.game.games.mineware.effect.DeathEffectData;
|
||||||
@ -208,9 +211,9 @@ public class BawkBawkBattles extends TeamGame implements IThrown
|
|||||||
_challenges.add(ChallengeBlockLobbers.class); // Playable - Refactored
|
_challenges.add(ChallengeBlockLobbers.class); // Playable - Refactored
|
||||||
_challenges.add(ChallengeBouncingBlock.class); // Playable - Refactored
|
_challenges.add(ChallengeBouncingBlock.class); // Playable - Refactored
|
||||||
_challenges.add(ChallengeBuildRace.class); // Playable - Refactored
|
_challenges.add(ChallengeBuildRace.class); // Playable - Refactored
|
||||||
_challenges.add(ChallengeChestLoot.class); // Playable
|
_challenges.add(ChallengeDiamondSeeker.class); // Playable - Refactored
|
||||||
_challenges.add(ChallengeCloudFall.class); // Broken
|
_challenges.add(ChallengeCloudFall.class); // Test Needed
|
||||||
_challenges.add(ChallengeDogsVersusCats.class); // Playable
|
_challenges.add(ChallengeDogsVersusCats.class); // Playable - Refactored
|
||||||
_challenges.add(ChallengeDragonEgg.class); // Playable
|
_challenges.add(ChallengeDragonEgg.class); // Playable
|
||||||
_challenges.add(ChallengeFallingBlocks.class); // Playable
|
_challenges.add(ChallengeFallingBlocks.class); // Playable
|
||||||
_challenges.add(ChallengeFastFood.class); // Playable
|
_challenges.add(ChallengeFastFood.class); // Playable
|
||||||
@ -782,12 +785,16 @@ public class BawkBawkBattles extends TeamGame implements IThrown
|
|||||||
|
|
||||||
List<String> messages = Arrays.asList(challenge.getGameMessages());
|
List<String> messages = Arrays.asList(challenge.getGameMessages());
|
||||||
|
|
||||||
|
String type = challenge.getType().toString();
|
||||||
|
|
||||||
|
if (challenge.getSettings().isTeamBased() && challenge.getType() == ChallengeType.LastStanding)
|
||||||
|
type = "Team Based";
|
||||||
|
|
||||||
for (Player player : UtilServer.getPlayers()) // Show to all players.
|
for (Player player : UtilServer.getPlayers()) // Show to all players.
|
||||||
{
|
{
|
||||||
UtilPlayer.message(player, "");
|
UtilPlayer.message(player, "");
|
||||||
// UtilPlayer.message(player, F.count(ArcadeFormat.Line));
|
|
||||||
|
|
||||||
UtilPlayer.message(player, " " + C.cYellow + challenge.getName() + C.Reset + " " + C.cGray + challenge.getType().toString());
|
UtilPlayer.message(player, " " + C.cYellow + challenge.getName() + C.Reset + " " + C.cGray + type);
|
||||||
UtilPlayer.message(player, "");
|
UtilPlayer.message(player, "");
|
||||||
|
|
||||||
for (String currentMessage : messages)
|
for (String currentMessage : messages)
|
||||||
@ -795,7 +802,6 @@ public class BawkBawkBattles extends TeamGame implements IThrown
|
|||||||
UtilPlayer.message(player, C.cGray + " - " + C.cWhite + currentMessage);
|
UtilPlayer.message(player, C.cGray + " - " + C.cWhite + currentMessage);
|
||||||
|
|
||||||
UtilPlayer.message(player, "");
|
UtilPlayer.message(player, "");
|
||||||
// UtilPlayer.message(player, F.count(ArcadeFormat.Line));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
while (true)
|
while (true)
|
||||||
@ -1234,7 +1240,7 @@ public class BawkBawkBattles extends TeamGame implements IThrown
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
Class<? extends Challenge> result = (Class<? extends Challenge>) Class
|
Class<? extends Challenge> result = (Class<? extends Challenge>) Class
|
||||||
.forName("nautilus.game.arcade.game.games.mineware.challenges.Challenge" + rawClass);
|
.forName("nautilus.game.arcade.game.games.mineware.challenge.type.Challenge" + rawClass);
|
||||||
|
|
||||||
Announce(C.cAqua + C.Bold + GetName() + " restricted to " + rawClass + " challenge.");
|
Announce(C.cAqua + C.Bold + GetName() + " restricted to " + rawClass + " challenge.");
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package nautilus.game.arcade.game.games.mineware;
|
package nautilus.game.arcade.game.games.mineware.challenge;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -33,6 +33,7 @@ import mineplex.core.projectile.ProjectileUser;
|
|||||||
import mineplex.core.updater.UpdateType;
|
import mineplex.core.updater.UpdateType;
|
||||||
import mineplex.core.updater.event.UpdateEvent;
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
import mineplex.minecraft.game.core.condition.Condition.ConditionType;
|
import mineplex.minecraft.game.core.condition.Condition.ConditionType;
|
||||||
|
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
||||||
import nautilus.game.arcade.world.WorldData;
|
import nautilus.game.arcade.world.WorldData;
|
||||||
|
|
||||||
public abstract class Challenge implements Listener
|
public abstract class Challenge implements Listener
|
@ -1,4 +1,4 @@
|
|||||||
package nautilus.game.arcade.game.games.mineware;
|
package nautilus.game.arcade.game.games.mineware.challenge;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
@ -1,4 +1,4 @@
|
|||||||
package nautilus.game.arcade.game.games.mineware;
|
package nautilus.game.arcade.game.games.mineware.challenge;
|
||||||
|
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package nautilus.game.arcade.game.games.mineware;
|
package nautilus.game.arcade.game.games.mineware.challenge;
|
||||||
|
|
||||||
public enum ChallengeType
|
public enum ChallengeType
|
||||||
{
|
{
|
@ -1,4 +1,4 @@
|
|||||||
package nautilus.game.arcade.game.games.mineware;
|
package nautilus.game.arcade.game.games.mineware.challenge.other;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@ -8,6 +8,9 @@ import org.bukkit.Location;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import mineplex.core.common.util.UtilPlayer;
|
import mineplex.core.common.util.UtilPlayer;
|
||||||
|
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
||||||
|
import nautilus.game.arcade.game.games.mineware.challenge.Challenge;
|
||||||
|
import nautilus.game.arcade.game.games.mineware.challenge.ChallengeType;
|
||||||
|
|
||||||
public abstract class ChallengeSeperateRooms extends Challenge
|
public abstract class ChallengeSeperateRooms extends Challenge
|
||||||
{
|
{
|
@ -0,0 +1,43 @@
|
|||||||
|
package nautilus.game.arcade.game.games.mineware.challenge.other;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
public class ChallengeTeam
|
||||||
|
{
|
||||||
|
private String _name;
|
||||||
|
private ArrayList<Player> _players = new ArrayList<>();
|
||||||
|
|
||||||
|
public ChallengeTeam(String name)
|
||||||
|
{
|
||||||
|
_name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName()
|
||||||
|
{
|
||||||
|
return _name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void add(Player player)
|
||||||
|
{
|
||||||
|
if (!_players.contains(player))
|
||||||
|
_players.add(player);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void remove(Player player)
|
||||||
|
{
|
||||||
|
if (_players.contains(player))
|
||||||
|
_players.remove(player);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isMember(Player player)
|
||||||
|
{
|
||||||
|
return _players.contains(player);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<Player> getPlayers()
|
||||||
|
{
|
||||||
|
return _players;
|
||||||
|
}
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
package nautilus.game.arcade.game.games.mineware.model;
|
package nautilus.game.arcade.game.games.mineware.challenge.other;
|
||||||
|
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
@ -8,7 +8,7 @@ import org.bukkit.entity.Zombie;
|
|||||||
|
|
||||||
import mineplex.core.common.util.C;
|
import mineplex.core.common.util.C;
|
||||||
import mineplex.core.common.util.UtilEnt;
|
import mineplex.core.common.util.UtilEnt;
|
||||||
import nautilus.game.arcade.game.games.mineware.challenges.ChallengeInfestation;
|
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeInfestation;
|
||||||
|
|
||||||
public class InfestationZombie
|
public class InfestationZombie
|
||||||
{
|
{
|
@ -1,4 +1,4 @@
|
|||||||
package nautilus.game.arcade.game.games.mineware.challenges;
|
package nautilus.game.arcade.game.games.mineware.challenge.type;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
@ -13,7 +13,6 @@ import org.bukkit.World;
|
|||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.FallingBlock;
|
import org.bukkit.entity.FallingBlock;
|
||||||
import org.bukkit.entity.Item;
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.entity.EntityChangeBlockEvent;
|
import org.bukkit.event.entity.EntityChangeBlockEvent;
|
||||||
@ -27,8 +26,8 @@ import mineplex.core.common.util.UtilMath;
|
|||||||
import mineplex.core.common.util.UtilServer;
|
import mineplex.core.common.util.UtilServer;
|
||||||
import mineplex.core.common.util.UtilShapes;
|
import mineplex.core.common.util.UtilShapes;
|
||||||
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
||||||
import nautilus.game.arcade.game.games.mineware.Challenge;
|
import nautilus.game.arcade.game.games.mineware.challenge.Challenge;
|
||||||
import nautilus.game.arcade.game.games.mineware.ChallengeType;
|
import nautilus.game.arcade.game.games.mineware.challenge.ChallengeType;
|
||||||
|
|
||||||
// TODO: Use onCollide method for anvil damage.
|
// TODO: Use onCollide method for anvil damage.
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package nautilus.game.arcade.game.games.mineware.challenges;
|
package nautilus.game.arcade.game.games.mineware.challenge.type;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
@ -23,8 +23,8 @@ import mineplex.core.common.util.UtilBlock;
|
|||||||
import mineplex.core.common.util.UtilMath;
|
import mineplex.core.common.util.UtilMath;
|
||||||
import mineplex.core.itemstack.ItemBuilder;
|
import mineplex.core.itemstack.ItemBuilder;
|
||||||
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
||||||
import nautilus.game.arcade.game.games.mineware.Challenge;
|
import nautilus.game.arcade.game.games.mineware.challenge.Challenge;
|
||||||
import nautilus.game.arcade.game.games.mineware.ChallengeType;
|
import nautilus.game.arcade.game.games.mineware.challenge.ChallengeType;
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
public class ChallengeArrowRampage extends Challenge
|
public class ChallengeArrowRampage extends Challenge
|
||||||
@ -118,6 +118,7 @@ public class ChallengeArrowRampage extends Challenge
|
|||||||
@Override
|
@Override
|
||||||
public void onEnd()
|
public void onEnd()
|
||||||
{
|
{
|
||||||
|
_arrows.clear();
|
||||||
removeFallingBlockEntities();
|
removeFallingBlockEntities();
|
||||||
|
|
||||||
// _antiHackFix.clear();
|
// _antiHackFix.clear();
|
@ -1,4 +1,4 @@
|
|||||||
package nautilus.game.arcade.game.games.mineware.challenges;
|
package nautilus.game.arcade.game.games.mineware.challenge.type;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
@ -26,8 +26,8 @@ import mineplex.core.projectile.ProjectileUser;
|
|||||||
import mineplex.core.updater.UpdateType;
|
import mineplex.core.updater.UpdateType;
|
||||||
import mineplex.core.updater.event.UpdateEvent;
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
||||||
import nautilus.game.arcade.game.games.mineware.Challenge;
|
import nautilus.game.arcade.game.games.mineware.challenge.Challenge;
|
||||||
import nautilus.game.arcade.game.games.mineware.ChallengeType;
|
import nautilus.game.arcade.game.games.mineware.challenge.ChallengeType;
|
||||||
|
|
||||||
public class ChallengeBlockLobbers extends Challenge
|
public class ChallengeBlockLobbers extends Challenge
|
||||||
{
|
{
|
@ -1,4 +1,4 @@
|
|||||||
package nautilus.game.arcade.game.games.mineware.challenges;
|
package nautilus.game.arcade.game.games.mineware.challenge.type;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@ -27,8 +27,8 @@ import mineplex.core.recharge.Recharge;
|
|||||||
import mineplex.core.updater.UpdateType;
|
import mineplex.core.updater.UpdateType;
|
||||||
import mineplex.core.updater.event.UpdateEvent;
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
||||||
import nautilus.game.arcade.game.games.mineware.Challenge;
|
import nautilus.game.arcade.game.games.mineware.challenge.Challenge;
|
||||||
import nautilus.game.arcade.game.games.mineware.ChallengeType;
|
import nautilus.game.arcade.game.games.mineware.challenge.ChallengeType;
|
||||||
|
|
||||||
public class ChallengeBouncingBlock extends Challenge
|
public class ChallengeBouncingBlock extends Challenge
|
||||||
{
|
{
|
@ -1,4 +1,4 @@
|
|||||||
package nautilus.game.arcade.game.games.mineware.challenges;
|
package nautilus.game.arcade.game.games.mineware.challenge.type;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
@ -23,8 +23,8 @@ import mineplex.core.common.util.UtilServer;
|
|||||||
import mineplex.core.common.util.UtilShapes;
|
import mineplex.core.common.util.UtilShapes;
|
||||||
import mineplex.core.common.util.UtilTextMiddle;
|
import mineplex.core.common.util.UtilTextMiddle;
|
||||||
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
||||||
import nautilus.game.arcade.game.games.mineware.Challenge;
|
import nautilus.game.arcade.game.games.mineware.challenge.Challenge;
|
||||||
import nautilus.game.arcade.game.games.mineware.ChallengeType;
|
import nautilus.game.arcade.game.games.mineware.challenge.ChallengeType;
|
||||||
|
|
||||||
public class ChallengeBuildRace extends Challenge
|
public class ChallengeBuildRace extends Challenge
|
||||||
{
|
{
|
@ -0,0 +1,169 @@
|
|||||||
|
package nautilus.game.arcade.game.games.mineware.challenge.type;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
import org.bukkit.Location;
|
||||||
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.block.Block;
|
||||||
|
import org.bukkit.block.BlockFace;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.event.EventHandler;
|
||||||
|
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||||
|
|
||||||
|
import mineplex.core.common.util.UtilMath;
|
||||||
|
import mineplex.core.common.util.UtilShapes;
|
||||||
|
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||||
|
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
||||||
|
import nautilus.game.arcade.game.games.mineware.challenge.Challenge;
|
||||||
|
import nautilus.game.arcade.game.games.mineware.challenge.ChallengeType;
|
||||||
|
|
||||||
|
public class ChallengeCloudFall extends Challenge
|
||||||
|
{
|
||||||
|
public ChallengeCloudFall(BawkBawkBattles host)
|
||||||
|
{
|
||||||
|
super(
|
||||||
|
host,
|
||||||
|
ChallengeType.FirstComplete,
|
||||||
|
"Cloud Fall",
|
||||||
|
"Jump and land on green wool.",
|
||||||
|
"Avoid the deadly clouds!");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ArrayList<Location> createSpawns()
|
||||||
|
{
|
||||||
|
ArrayList<Location> spawns = new ArrayList<Location>();
|
||||||
|
int size = getArenaSize() - 1;
|
||||||
|
|
||||||
|
for (int x = -size; x <= getArenaSize(); x++)
|
||||||
|
{
|
||||||
|
for (int z = -size; z <= getArenaSize(); z++)
|
||||||
|
{
|
||||||
|
boolean goodSpawn = true;
|
||||||
|
|
||||||
|
int y = 73;
|
||||||
|
|
||||||
|
if (x % 2 == 0 && z % 2 == 0)
|
||||||
|
{
|
||||||
|
Block targetBlock = getCenter().add(x, y, z).getBlock();
|
||||||
|
y = (int) targetBlock.getLocation().getY();
|
||||||
|
|
||||||
|
while (targetBlock.getType() == Material.AIR)
|
||||||
|
{
|
||||||
|
if (y > 76)
|
||||||
|
{
|
||||||
|
goodSpawn = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
y++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (goodSpawn)
|
||||||
|
{
|
||||||
|
spawns.add(getCenter().clone().add(x + 0.5, y + 1.1, z + 0.5));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return spawns;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
|
@Override
|
||||||
|
public void createMap()
|
||||||
|
{
|
||||||
|
for (int x = -getArenaSize(); x <= getArenaSize(); x++)
|
||||||
|
{
|
||||||
|
for (int z = -getArenaSize(); z <= getArenaSize(); z++)
|
||||||
|
{
|
||||||
|
for (int y = 0; y <= 75; y++)
|
||||||
|
{
|
||||||
|
Block block = getCenter().getBlock().getRelative(x, y, z);
|
||||||
|
int size = getArenaSize() - 2;
|
||||||
|
|
||||||
|
if (y == 0)
|
||||||
|
{
|
||||||
|
block.setType(Material.WOOL);
|
||||||
|
}
|
||||||
|
else if (y == 1 && UtilMath.r(8) == 0 && Math.abs(x) < size && Math.abs(z) < size)
|
||||||
|
{
|
||||||
|
block.setType(Material.WOOL);
|
||||||
|
block.setData((byte) 5);
|
||||||
|
|
||||||
|
block.getRelative(BlockFace.UP).setType(Material.WOOL);
|
||||||
|
block.getRelative(BlockFace.UP).setData((byte) 5);
|
||||||
|
addBlock(block.getRelative(BlockFace.UP));
|
||||||
|
}
|
||||||
|
else if (y > 10 && y < 70 && UtilMath.r(200) == 1)
|
||||||
|
{
|
||||||
|
block.getRelative(BlockFace.NORTH).setType(Material.STAINED_CLAY);
|
||||||
|
block.getRelative(BlockFace.EAST).setType(Material.STAINED_CLAY);
|
||||||
|
block.getRelative(BlockFace.WEST).setType(Material.STAINED_CLAY);
|
||||||
|
block.getRelative(BlockFace.SOUTH).setType(Material.STAINED_CLAY);
|
||||||
|
|
||||||
|
addBlock(block.getRelative(BlockFace.NORTH));
|
||||||
|
addBlock(block.getRelative(BlockFace.EAST));
|
||||||
|
addBlock(block.getRelative(BlockFace.WEST));
|
||||||
|
addBlock(block.getRelative(BlockFace.SOUTH));
|
||||||
|
}
|
||||||
|
|
||||||
|
addBlock(block);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Spawn Platform
|
||||||
|
|
||||||
|
int size = 8;
|
||||||
|
|
||||||
|
for (Location location : UtilShapes.getCircle(getCenter().add(0, 13, 0), false, size))
|
||||||
|
{
|
||||||
|
Block block = location.getBlock();
|
||||||
|
block.setType(Material.WOOL);
|
||||||
|
block.setData((byte) UtilMath.r(16));
|
||||||
|
|
||||||
|
addBlock(block);
|
||||||
|
}
|
||||||
|
for (Location location : UtilShapes.getCircle(getCenter().add(0, 13, 0), false, size / 2))
|
||||||
|
{
|
||||||
|
location.getBlock().setType(Material.AIR);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStart()
|
||||||
|
{
|
||||||
|
Host.DamageFall = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onEnd()
|
||||||
|
{
|
||||||
|
Host.DamageFall = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void onCustomDamage(CustomDamageEvent event)
|
||||||
|
{
|
||||||
|
if (!Host.IsLive())
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (!(event.GetDamageeEntity() instanceof Player))
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (event.GetCause() != DamageCause.FALL)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (Data.isDone(event.GetDamageePlayer()))
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (Math.round(event.GetDamageePlayer().getLocation().getY()) == 3)
|
||||||
|
{
|
||||||
|
event.SetCancelled("Fell on Wool");
|
||||||
|
setCompleted(event.GetDamageePlayer());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,148 @@
|
|||||||
|
package nautilus.game.arcade.game.games.mineware.challenge.type;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
import org.bukkit.Location;
|
||||||
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.block.Block;
|
||||||
|
import org.bukkit.block.BlockFace;
|
||||||
|
import org.bukkit.block.Chest;
|
||||||
|
import org.bukkit.block.DoubleChest;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.event.EventHandler;
|
||||||
|
import org.bukkit.event.inventory.InventoryClickEvent;
|
||||||
|
import org.bukkit.inventory.Inventory;
|
||||||
|
import org.bukkit.inventory.InventoryHolder;
|
||||||
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
|
import mineplex.core.common.util.UtilMath;
|
||||||
|
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
||||||
|
import nautilus.game.arcade.game.games.mineware.challenge.Challenge;
|
||||||
|
import nautilus.game.arcade.game.games.mineware.challenge.ChallengeType;
|
||||||
|
|
||||||
|
public class ChallengeDiamondSeeker extends Challenge
|
||||||
|
{
|
||||||
|
public ChallengeDiamondSeeker(BawkBawkBattles host)
|
||||||
|
{
|
||||||
|
super(
|
||||||
|
host,
|
||||||
|
ChallengeType.FirstComplete,
|
||||||
|
"Diamond Seeker",
|
||||||
|
"Find a diamond in the chests.");
|
||||||
|
|
||||||
|
Settings.setUseMapHeight();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ArrayList<Location> createSpawns()
|
||||||
|
{
|
||||||
|
ArrayList<Location> spawns = new ArrayList<Location>();
|
||||||
|
int size = getArenaSize() - 1;
|
||||||
|
|
||||||
|
for (int x = -size; x <= size; x++)
|
||||||
|
{
|
||||||
|
for (int z = -size; z <= size; z++)
|
||||||
|
{
|
||||||
|
if (x % 2 == 0 && z % 2 == 0)
|
||||||
|
{
|
||||||
|
spawns.add(getCenter().clone().add(x + 0.5, 2.1, z + 0.5));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return spawns;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
|
@Override
|
||||||
|
public void createMap()
|
||||||
|
{
|
||||||
|
ArrayList<Inventory> inventories = new ArrayList<Inventory>();
|
||||||
|
|
||||||
|
for (int x = -getArenaSize(); x <= getArenaSize(); x++)
|
||||||
|
{
|
||||||
|
for (int z = -getArenaSize(); z <= getArenaSize(); z++)
|
||||||
|
{
|
||||||
|
Block block = getCenter().getBlock().getRelative(x, 0, z);
|
||||||
|
block.setType(Material.STAINED_CLAY);
|
||||||
|
block.setData((byte) UtilMath.r(16));
|
||||||
|
|
||||||
|
addBlock(block);
|
||||||
|
|
||||||
|
if (Math.abs(x) % 2 == 0 && Math.abs(z) % 2 == 0)
|
||||||
|
{
|
||||||
|
Block relativeBlock = block.getRelative(0, 1, 0);
|
||||||
|
relativeBlock.setType(Material.CHEST);
|
||||||
|
relativeBlock.setData((byte) UtilMath.r(4));
|
||||||
|
addBlock(relativeBlock);
|
||||||
|
|
||||||
|
Inventory inventory = ((Chest) relativeBlock.getState()).getInventory();
|
||||||
|
inventories.add(inventory);
|
||||||
|
|
||||||
|
for (int i = 0; i < inventory.getSize(); i++)
|
||||||
|
{
|
||||||
|
ItemStack item = new ItemStack(UtilMath.randomElement(Material.values()));
|
||||||
|
|
||||||
|
if (item.getType() != Material.DIAMOND && item.getType() != Material.AIR)
|
||||||
|
inventory.setItem(i, item);
|
||||||
|
else
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Block relativeBlock = block.getRelative(BlockFace.UP);
|
||||||
|
relativeBlock.setType(Material.STAINED_CLAY);
|
||||||
|
relativeBlock.setData((byte) UtilMath.r(16));
|
||||||
|
addBlock(relativeBlock);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < 10 + getChallengers().size(); i++)
|
||||||
|
{
|
||||||
|
Inventory inventory = UtilMath.randomElement(inventories);
|
||||||
|
inventory.setItem(UtilMath.r(inventory.getSize()), new ItemStack(Material.DIAMOND));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStart()
|
||||||
|
{
|
||||||
|
Host.InventoryOpenChest = true;
|
||||||
|
Host.InventoryOpenBlock = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onEnd()
|
||||||
|
{
|
||||||
|
Host.InventoryOpenChest = false;
|
||||||
|
Host.InventoryOpenBlock = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void onInventoryClick(InventoryClickEvent event)
|
||||||
|
{
|
||||||
|
if (!Host.IsLive())
|
||||||
|
return;
|
||||||
|
|
||||||
|
InventoryHolder holder = event.getInventory().getHolder();
|
||||||
|
Player player = (Player) event.getWhoClicked();
|
||||||
|
|
||||||
|
if (!(holder instanceof Player))
|
||||||
|
{
|
||||||
|
event.setCancelled(true);
|
||||||
|
|
||||||
|
if (holder instanceof DoubleChest || holder instanceof Chest)
|
||||||
|
{
|
||||||
|
ItemStack item = event.getCurrentItem();
|
||||||
|
|
||||||
|
if (item != null && item.getType() == Material.DIAMOND)
|
||||||
|
{
|
||||||
|
event.setCurrentItem(new ItemStack(Material.AIR));
|
||||||
|
setCompleted(player);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,9 +1,7 @@
|
|||||||
package nautilus.game.arcade.game.games.mineware.challenges;
|
package nautilus.game.arcade.game.games.mineware.challenge.type;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.GameMode;
|
import org.bukkit.GameMode;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
@ -13,6 +11,8 @@ import org.bukkit.entity.Player;
|
|||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.block.Action;
|
import org.bukkit.event.block.Action;
|
||||||
import org.bukkit.event.player.PlayerInteractEvent;
|
import org.bukkit.event.player.PlayerInteractEvent;
|
||||||
|
import org.bukkit.event.player.PlayerQuitEvent;
|
||||||
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
import mineplex.core.common.util.C;
|
import mineplex.core.common.util.C;
|
||||||
import mineplex.core.common.util.UtilMath;
|
import mineplex.core.common.util.UtilMath;
|
||||||
@ -28,17 +28,19 @@ import mineplex.core.itemstack.ItemStackFactory;
|
|||||||
import mineplex.core.updater.UpdateType;
|
import mineplex.core.updater.UpdateType;
|
||||||
import mineplex.core.updater.event.UpdateEvent;
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
||||||
import nautilus.game.arcade.game.games.mineware.Challenge;
|
import nautilus.game.arcade.game.games.mineware.challenge.Challenge;
|
||||||
import nautilus.game.arcade.game.games.mineware.ChallengeType;
|
import nautilus.game.arcade.game.games.mineware.challenge.ChallengeType;
|
||||||
|
import nautilus.game.arcade.game.games.mineware.challenge.other.ChallengeTeam;
|
||||||
|
|
||||||
public class ChallengeDogsVersusCats extends Challenge
|
public class ChallengeDogsVersusCats extends Challenge
|
||||||
{
|
{
|
||||||
|
private ChallengeTeam _dogTeam;
|
||||||
|
private ChallengeTeam _catTeam;
|
||||||
|
|
||||||
private int _catScore = 0;
|
private int _catScore = 0;
|
||||||
private int _dogScore = 0;
|
private int _dogScore = 0;
|
||||||
|
|
||||||
private static final int _scorePerPlayer = 100;
|
private final int _scorePerPlayer = 100;
|
||||||
|
|
||||||
private HashMap<String, String> _team = new HashMap<String, String>(); // <Player, team>
|
|
||||||
|
|
||||||
public ChallengeDogsVersusCats(BawkBawkBattles host)
|
public ChallengeDogsVersusCats(BawkBawkBattles host)
|
||||||
{
|
{
|
||||||
@ -50,30 +52,124 @@ public class ChallengeDogsVersusCats extends Challenge
|
|||||||
"If you are a cat, meow.",
|
"If you are a cat, meow.",
|
||||||
"Look up and punch to bark or meow.",
|
"Look up and punch to bark or meow.",
|
||||||
"First team to the end number wins!");
|
"First team to the end number wins!");
|
||||||
|
|
||||||
Settings.setUseMapHeight();
|
Settings.setUseMapHeight();
|
||||||
Settings.setTeamBased();
|
Settings.setTeamBased();
|
||||||
Settings.setDuration(75000);
|
Settings.setDuration(75000);
|
||||||
|
|
||||||
|
_catTeam = new ChallengeTeam("Cats");
|
||||||
|
_dogTeam = new ChallengeTeam("Dogs");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ArrayList<Location> createSpawns()
|
public ArrayList<Location> createSpawns()
|
||||||
{
|
{
|
||||||
ArrayList<Location> spawns = new ArrayList<Location>();
|
ArrayList<Location> spawns = new ArrayList<Location>();
|
||||||
|
int size = getArenaSize() - 1;
|
||||||
|
|
||||||
for (int x = -(getArenaSize() - 1); x <= getArenaSize() - 1; x++)
|
for (int x = -size; x <= size; x++)
|
||||||
{
|
{
|
||||||
for (int z = -(getArenaSize() - 1); z <= getArenaSize() - 1; z++)
|
for (int z = -size; z <= size; z++)
|
||||||
{
|
{
|
||||||
if (x % 2 == 0 && z % 2 == 0)
|
if (x % 2 == 0 && z % 2 == 0)
|
||||||
{
|
{
|
||||||
spawns.add(getCenter().clone().add(x + 0.5, 1.1, z + 0.5));
|
Location loc = getCenter().clone().add(x + 0.5, 1.1, z + 0.5);
|
||||||
|
spawns.add(loc);
|
||||||
|
System.out.println("X: " + loc.getX() + " Y:" + loc.getY() + " Z:" + loc.getZ());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return spawns;
|
return spawns;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
|
@Override
|
||||||
|
public void createMap()
|
||||||
|
{
|
||||||
|
for (int x = -getArenaSize(); x <= getArenaSize(); x++)
|
||||||
|
{
|
||||||
|
for (int z = -getArenaSize(); z <= getArenaSize(); z++)
|
||||||
|
{
|
||||||
|
for (int y = 0; y <= 1; y++)
|
||||||
|
{
|
||||||
|
System.out.println("1");
|
||||||
|
Block block = getCenter().getBlock().getRelative(x, y, z);
|
||||||
|
|
||||||
|
if (y == 0)
|
||||||
|
{
|
||||||
|
System.out.println("2");
|
||||||
|
block.setType(Material.GRASS);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (Math.abs(x) == getArenaSize() || Math.abs(z) == getArenaSize())
|
||||||
|
{
|
||||||
|
System.out.println("3");
|
||||||
|
block.setType(Material.FENCE);
|
||||||
|
}
|
||||||
|
else if (y == 1 && UtilMath.r(4) == 0)
|
||||||
|
{
|
||||||
|
System.out.println("4");
|
||||||
|
if (UtilMath.r(8) == 0)
|
||||||
|
{
|
||||||
|
System.out.println("5");
|
||||||
|
block.setType(UtilMath.random.nextBoolean() ? Material.YELLOW_FLOWER : Material.RED_ROSE);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
System.out.println("6");
|
||||||
|
block.setType(Material.LONG_GRASS);
|
||||||
|
block.setData((byte) 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
System.out.println("End");
|
||||||
|
addBlock(block);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStart()
|
||||||
|
{
|
||||||
|
int looped = 0;
|
||||||
|
|
||||||
|
for (Player player : getChallengers())
|
||||||
|
{
|
||||||
|
player.setGameMode(GameMode.ADVENTURE);
|
||||||
|
|
||||||
|
if (looped % 2 == 0)
|
||||||
|
{
|
||||||
|
_dogTeam.add(player);
|
||||||
|
|
||||||
|
DisguiseWolf Ddog = new DisguiseWolf(player);
|
||||||
|
Host.getArcadeManager().GetDisguise().disguise(Ddog);
|
||||||
|
|
||||||
|
player.getInventory()
|
||||||
|
.addItem(ItemStackFactory.Instance.CreateStack(Material.BONE, (byte) 0, 1, C.Reset + C.Bold + "Left-Click to bark!"));
|
||||||
|
UtilPlayer.message(player, C.cYellow + C.Bold + "You are a Dog, bark!");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_catTeam.add(player);
|
||||||
|
|
||||||
|
DisguiseCat Dcat = new DisguiseCat(player);
|
||||||
|
Host.getArcadeManager().GetDisguise().disguise(Dcat);
|
||||||
|
|
||||||
|
player.getInventory().addItem(
|
||||||
|
ItemStackFactory.Instance.CreateStack(Material.STRING, (byte) 0, 1, C.Reset + C.Bold + "Left-Click to meow!"));
|
||||||
|
UtilPlayer.message(player, C.cYellow + C.Bold + "You are a Cat, meow!");
|
||||||
|
}
|
||||||
|
|
||||||
|
looped++;
|
||||||
|
}
|
||||||
|
|
||||||
|
System.out.println("onStart");
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onEnd()
|
public void onEnd()
|
||||||
{
|
{
|
||||||
@ -86,178 +182,89 @@ public class ChallengeDogsVersusCats extends Challenge
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onStart()
|
|
||||||
{
|
|
||||||
int looped = 0;
|
|
||||||
|
|
||||||
for (Player player : Host.GetPlayers(true))
|
|
||||||
{
|
|
||||||
if (Host.IsPlaying(player))
|
|
||||||
{
|
|
||||||
player.setGameMode(GameMode.ADVENTURE);
|
|
||||||
}
|
|
||||||
if (looped % 2 == 0)
|
|
||||||
{
|
|
||||||
_team.put(player.getName(), "dog");
|
|
||||||
|
|
||||||
DisguiseWolf Ddog = new DisguiseWolf(player);
|
|
||||||
Host.getArcadeManager().GetDisguise().disguise(Ddog);
|
|
||||||
|
|
||||||
player.getInventory().addItem(
|
|
||||||
ItemStackFactory.Instance.CreateStack(Material.BONE, (byte) 0, 1, C.Reset + C.Bold + "Left-Click to bark!"));
|
|
||||||
UtilPlayer.message(player, C.cYellow + C.Bold + "You are a Dog, bark!");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_team.put(player.getName(), "cat");
|
|
||||||
|
|
||||||
DisguiseCat Dcat = new DisguiseCat(player);
|
|
||||||
Host.getArcadeManager().GetDisguise().disguise(Dcat);
|
|
||||||
|
|
||||||
player.getInventory().addItem(
|
|
||||||
ItemStackFactory.Instance.CreateStack(Material.STRING, (byte) 0, 1, C.Reset + C.Bold + "Left-Click to meow!"));
|
|
||||||
UtilPlayer.message(player, C.cYellow + C.Bold + "You are a Cat, meow!");
|
|
||||||
}
|
|
||||||
looped++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
@Override
|
|
||||||
public void createMap()
|
|
||||||
{
|
|
||||||
for (int x = -getArenaSize(); x <= getArenaSize(); x++)
|
|
||||||
{
|
|
||||||
for (int z = -getArenaSize(); z <= getArenaSize(); z++)
|
|
||||||
{
|
|
||||||
for (int y = 0; y <= 1; y++)
|
|
||||||
{
|
|
||||||
Block b = getCenter().getBlock().getRelative(x, y, z);
|
|
||||||
|
|
||||||
if (y == 0)
|
|
||||||
{
|
|
||||||
b.setType(Material.GRASS);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (Math.abs(x) == getArenaSize() || Math.abs(z) == getArenaSize())
|
|
||||||
{
|
|
||||||
b.setType(Material.FENCE);
|
|
||||||
}
|
|
||||||
else if (UtilMath.r(4) == 0 && y == 1)
|
|
||||||
{
|
|
||||||
if (UtilMath.r(8) == 0)
|
|
||||||
{
|
|
||||||
b.setType(UtilMath.random.nextBoolean() ? Material.YELLOW_FLOWER : Material.RED_ROSE);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
b.setType(Material.LONG_GRASS);
|
|
||||||
b.setData((byte) 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (b.getType() != Material.AIR)
|
|
||||||
{
|
|
||||||
addBlock(b);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void checkForWinner(UpdateEvent event)
|
public void onUpdate(UpdateEvent event)
|
||||||
{
|
{
|
||||||
if (event.getType() != UpdateType.TICK)
|
if (event.getType() != UpdateType.TICK)
|
||||||
{
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
if (!Host.IsLive())
|
if (!Host.IsLive())
|
||||||
{
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
int catScore = calculateScore("cat");
|
int catScore = calculateScore(_catTeam);
|
||||||
int dogScore = calculateScore("dog");
|
int dogScore = calculateScore(_dogTeam);
|
||||||
|
|
||||||
UtilTextMiddle.display("", C.cBlue + C.Bold + " Dogs: " + C.cGreen + _dogScore + "/" + dogScore + C.cGray + " - " + C.cRed + C.Bold
|
UtilTextMiddle.display("", C.cBlue + C.Bold + " Dogs: " + C.cGreen + _dogScore + "/" + dogScore + C.cGray + " - " + C.cRed + C.Bold
|
||||||
+ "Cats: " + C.cGreen + _catScore + "/" + catScore);
|
+ "Cats: " + C.cGreen + _catScore + "/" + catScore);
|
||||||
|
|
||||||
if (_catScore >= catScore)
|
if (_catScore >= catScore)
|
||||||
{
|
{
|
||||||
for (String player : _team.keySet())
|
for (Player player : _catTeam.getPlayers())
|
||||||
{
|
{
|
||||||
if (_team.get(player) == "cat")
|
setCompleted(player);
|
||||||
{
|
|
||||||
setCompleted(Bukkit.getPlayer(player));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
setLost(Bukkit.getPlayer(player));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (_dogScore >= dogScore)
|
else if (_dogScore >= dogScore)
|
||||||
{
|
{
|
||||||
for (String player : _team.keySet())
|
for (Player player : _dogTeam.getPlayers())
|
||||||
{
|
{
|
||||||
if (_team.get(player) == "dog")
|
setCompleted(player);
|
||||||
{
|
|
||||||
setCompleted(Bukkit.getPlayer(player));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
setLost(Bukkit.getPlayer(player));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onItemLeftClick(PlayerInteractEvent event)
|
public void onPlayerInteract(PlayerInteractEvent event)
|
||||||
{
|
{
|
||||||
if (!Host.IsLive())
|
if (!Host.IsLive())
|
||||||
{
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
if (!Host.IsAlive(event.getPlayer()))
|
Player player = event.getPlayer();
|
||||||
{
|
|
||||||
|
if (!Host.IsAlive(player))
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
if (Data.isCompleted(event.getPlayer()))
|
if (Data.isCompleted(player))
|
||||||
{
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
if ((event.getAction() == Action.LEFT_CLICK_AIR) || (event.getAction() == Action.LEFT_CLICK_BLOCK))
|
if (event.getAction() == Action.LEFT_CLICK_AIR || event.getAction() == Action.LEFT_CLICK_BLOCK)
|
||||||
{
|
{
|
||||||
if (event.getPlayer().getItemInHand().getType() == Material.BONE || event.getPlayer().getItemInHand().getType() == Material.STRING)
|
ItemStack item = player.getItemInHand();
|
||||||
|
|
||||||
|
if (item.getType() == Material.BONE || item.getType() == Material.STRING)
|
||||||
{
|
{
|
||||||
if (_team.get(event.getPlayer().getName()) == "cat")
|
if (_catTeam.isMember(player))
|
||||||
{
|
{
|
||||||
//_catScore++;
|
|
||||||
incrementCatScore();
|
incrementCatScore();
|
||||||
event.getPlayer().playSound(event.getPlayer().getLocation(), Sound.CAT_MEOW, 1f, 1f);
|
player.playSound(event.getPlayer().getLocation(), Sound.CAT_MEOW, 1f, 1f);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//_dogScore++;
|
|
||||||
incrementDogScore();
|
incrementDogScore();
|
||||||
event.getPlayer().playSound(event.getPlayer().getLocation(), Sound.WOLF_BARK, 1f, 1f);
|
player.playSound(event.getPlayer().getLocation(), Sound.WOLF_BARK, 1f, 1f);
|
||||||
}
|
}
|
||||||
|
|
||||||
UtilParticle.PlayParticle(ParticleType.NOTE, event.getPlayer().getLocation().add(0.5, 1, 0.5), 0.5f, 0.5f, 0.5f, 0f, 2, ViewDist.MAX,
|
UtilParticle.PlayParticle(ParticleType.NOTE, event.getPlayer().getLocation().add(0.5, 1, 0.5), 0.5f, 0.5f, 0.5f, 0f, 2, ViewDist.MAX,
|
||||||
UtilServer.getPlayers());
|
UtilServer.getPlayers());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void onPlayerQuit(PlayerQuitEvent event)
|
||||||
|
{
|
||||||
|
if (!Host.IsLive())
|
||||||
|
return;
|
||||||
|
|
||||||
|
Player player = event.getPlayer();
|
||||||
|
|
||||||
|
_catTeam.remove(player);
|
||||||
|
_dogTeam.remove(player);
|
||||||
|
}
|
||||||
|
|
||||||
private void incrementCatScore()
|
private void incrementCatScore()
|
||||||
{
|
{
|
||||||
int maxScore = calculateScore("cat");
|
int maxScore = calculateScore(_catTeam);
|
||||||
|
|
||||||
if (_catScore < maxScore)
|
if (_catScore < maxScore)
|
||||||
_catScore++;
|
_catScore++;
|
||||||
@ -265,23 +272,22 @@ public class ChallengeDogsVersusCats extends Challenge
|
|||||||
|
|
||||||
private void incrementDogScore()
|
private void incrementDogScore()
|
||||||
{
|
{
|
||||||
int maxScore = calculateScore("dog");
|
int maxScore = calculateScore(_dogTeam);
|
||||||
|
|
||||||
if (_dogScore < maxScore)
|
if (_dogScore < maxScore)
|
||||||
_dogScore++;
|
_dogScore++;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int calculateScore(String teamName)
|
@SuppressWarnings("unused")
|
||||||
|
public int calculateScore(ChallengeTeam team)
|
||||||
{
|
{
|
||||||
int amountOnTeam = 0;
|
int amountOnTeam = 0;
|
||||||
|
|
||||||
for (String playerName : _team.keySet())
|
for (Player player : team.getPlayers())
|
||||||
{
|
{
|
||||||
if (teamName == _team.get(playerName))
|
amountOnTeam++;
|
||||||
{
|
|
||||||
amountOnTeam++;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return amountOnTeam * _scorePerPlayer;
|
return amountOnTeam * _scorePerPlayer;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,4 +1,4 @@
|
|||||||
package nautilus.game.arcade.game.games.mineware.challenges;
|
package nautilus.game.arcade.game.games.mineware.challenge.type;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@ -21,8 +21,8 @@ import mineplex.core.common.util.UtilPlayer;
|
|||||||
import mineplex.core.common.util.UtilServer;
|
import mineplex.core.common.util.UtilServer;
|
||||||
import mineplex.core.itemstack.ItemBuilder;
|
import mineplex.core.itemstack.ItemBuilder;
|
||||||
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
||||||
import nautilus.game.arcade.game.games.mineware.Challenge;
|
import nautilus.game.arcade.game.games.mineware.challenge.Challenge;
|
||||||
import nautilus.game.arcade.game.games.mineware.ChallengeType;
|
import nautilus.game.arcade.game.games.mineware.challenge.ChallengeType;
|
||||||
|
|
||||||
public class ChallengeDragonEgg extends Challenge
|
public class ChallengeDragonEgg extends Challenge
|
||||||
{
|
{
|
@ -1,4 +1,4 @@
|
|||||||
package nautilus.game.arcade.game.games.mineware.challenges;
|
package nautilus.game.arcade.game.games.mineware.challenge.type;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
@ -26,8 +26,8 @@ import mineplex.core.common.util.UtilServer;
|
|||||||
import mineplex.core.common.util.UtilShapes;
|
import mineplex.core.common.util.UtilShapes;
|
||||||
import mineplex.core.common.util.UtilTextBottom;
|
import mineplex.core.common.util.UtilTextBottom;
|
||||||
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
||||||
import nautilus.game.arcade.game.games.mineware.Challenge;
|
import nautilus.game.arcade.game.games.mineware.challenge.Challenge;
|
||||||
import nautilus.game.arcade.game.games.mineware.ChallengeType;
|
import nautilus.game.arcade.game.games.mineware.challenge.ChallengeType;
|
||||||
|
|
||||||
public class ChallengeFallingBlocks extends Challenge
|
public class ChallengeFallingBlocks extends Challenge
|
||||||
{
|
{
|
@ -1,4 +1,4 @@
|
|||||||
package nautilus.game.arcade.game.games.mineware.challenges;
|
package nautilus.game.arcade.game.games.mineware.challenge.type;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
@ -28,8 +28,8 @@ import mineplex.core.common.util.UtilShapes;
|
|||||||
import mineplex.core.itemstack.ItemStackFactory;
|
import mineplex.core.itemstack.ItemStackFactory;
|
||||||
import mineplex.core.recharge.Recharge;
|
import mineplex.core.recharge.Recharge;
|
||||||
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
||||||
import nautilus.game.arcade.game.games.mineware.Challenge;
|
import nautilus.game.arcade.game.games.mineware.challenge.Challenge;
|
||||||
import nautilus.game.arcade.game.games.mineware.ChallengeType;
|
import nautilus.game.arcade.game.games.mineware.challenge.ChallengeType;
|
||||||
|
|
||||||
public class ChallengeFastFood extends Challenge
|
public class ChallengeFastFood extends Challenge
|
||||||
{
|
{
|
@ -1,4 +1,4 @@
|
|||||||
package nautilus.game.arcade.game.games.mineware.challenges;
|
package nautilus.game.arcade.game.games.mineware.challenge.type;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@ -38,8 +38,8 @@ import mineplex.core.common.util.UtilTextBottom;
|
|||||||
import mineplex.core.itemstack.ItemBuilder;
|
import mineplex.core.itemstack.ItemBuilder;
|
||||||
import mineplex.core.recharge.Recharge;
|
import mineplex.core.recharge.Recharge;
|
||||||
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
||||||
import nautilus.game.arcade.game.games.mineware.Challenge;
|
import nautilus.game.arcade.game.games.mineware.challenge.Challenge;
|
||||||
import nautilus.game.arcade.game.games.mineware.ChallengeType;
|
import nautilus.game.arcade.game.games.mineware.challenge.ChallengeType;
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
public class ChallengeFishingDay extends Challenge
|
public class ChallengeFishingDay extends Challenge
|
@ -1,4 +1,4 @@
|
|||||||
package nautilus.game.arcade.game.games.mineware.challenges;
|
package nautilus.game.arcade.game.games.mineware.challenge.type;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
@ -23,9 +23,9 @@ import mineplex.core.updater.UpdateType;
|
|||||||
import mineplex.core.updater.event.UpdateEvent;
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||||
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
||||||
import nautilus.game.arcade.game.games.mineware.Challenge;
|
import nautilus.game.arcade.game.games.mineware.challenge.Challenge;
|
||||||
import nautilus.game.arcade.game.games.mineware.ChallengeType;
|
import nautilus.game.arcade.game.games.mineware.challenge.ChallengeType;
|
||||||
import nautilus.game.arcade.game.games.mineware.model.InfestationZombie;
|
import nautilus.game.arcade.game.games.mineware.challenge.other.InfestationZombie;
|
||||||
|
|
||||||
public class ChallengeInfestation extends Challenge
|
public class ChallengeInfestation extends Challenge
|
||||||
{
|
{
|
@ -1,4 +1,4 @@
|
|||||||
package nautilus.game.arcade.game.games.mineware.challenges;
|
package nautilus.game.arcade.game.games.mineware.challenge.type;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
@ -18,8 +18,8 @@ import mineplex.core.common.util.UtilMath;
|
|||||||
import mineplex.core.updater.UpdateType;
|
import mineplex.core.updater.UpdateType;
|
||||||
import mineplex.core.updater.event.UpdateEvent;
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
||||||
import nautilus.game.arcade.game.games.mineware.Challenge;
|
import nautilus.game.arcade.game.games.mineware.challenge.Challenge;
|
||||||
import nautilus.game.arcade.game.games.mineware.ChallengeType;
|
import nautilus.game.arcade.game.games.mineware.challenge.ChallengeType;
|
||||||
|
|
||||||
public class ChallengeKangarooJump extends Challenge
|
public class ChallengeKangarooJump extends Challenge
|
||||||
{
|
{
|
@ -1,4 +1,4 @@
|
|||||||
package nautilus.game.arcade.game.games.mineware.challenges;
|
package nautilus.game.arcade.game.games.mineware.challenge.type;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -22,8 +22,8 @@ import mineplex.core.updater.UpdateType;
|
|||||||
import mineplex.core.updater.event.UpdateEvent;
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||||
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
||||||
import nautilus.game.arcade.game.games.mineware.Challenge;
|
import nautilus.game.arcade.game.games.mineware.challenge.Challenge;
|
||||||
import nautilus.game.arcade.game.games.mineware.ChallengeType;
|
import nautilus.game.arcade.game.games.mineware.challenge.ChallengeType;
|
||||||
|
|
||||||
public class ChallengeKingOfTheHill extends Challenge
|
public class ChallengeKingOfTheHill extends Challenge
|
||||||
{
|
{
|
@ -1,4 +1,4 @@
|
|||||||
package nautilus.game.arcade.game.games.mineware.challenges;
|
package nautilus.game.arcade.game.games.mineware.challenge.type;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
@ -20,8 +20,8 @@ import mineplex.core.updater.UpdateType;
|
|||||||
import mineplex.core.updater.event.UpdateEvent;
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||||
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
||||||
import nautilus.game.arcade.game.games.mineware.Challenge;
|
import nautilus.game.arcade.game.games.mineware.challenge.Challenge;
|
||||||
import nautilus.game.arcade.game.games.mineware.ChallengeType;
|
import nautilus.game.arcade.game.games.mineware.challenge.ChallengeType;
|
||||||
|
|
||||||
public class ChallengeLavaRun extends Challenge
|
public class ChallengeLavaRun extends Challenge
|
||||||
{
|
{
|
@ -1,4 +1,4 @@
|
|||||||
package nautilus.game.arcade.game.games.mineware.challenges;
|
package nautilus.game.arcade.game.games.mineware.challenge.type;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@ -30,8 +30,8 @@ import mineplex.core.updater.UpdateType;
|
|||||||
import mineplex.core.updater.event.UpdateEvent;
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||||
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
||||||
import nautilus.game.arcade.game.games.mineware.Challenge;
|
import nautilus.game.arcade.game.games.mineware.challenge.Challenge;
|
||||||
import nautilus.game.arcade.game.games.mineware.ChallengeType;
|
import nautilus.game.arcade.game.games.mineware.challenge.ChallengeType;
|
||||||
|
|
||||||
public class ChallengeMilkACow extends Challenge
|
public class ChallengeMilkACow extends Challenge
|
||||||
{
|
{
|
@ -1,4 +1,4 @@
|
|||||||
package nautilus.game.arcade.game.games.mineware.challenges;
|
package nautilus.game.arcade.game.games.mineware.challenge.type;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
@ -15,8 +15,8 @@ import org.bukkit.inventory.ItemStack;
|
|||||||
|
|
||||||
import mineplex.core.common.util.UtilMath;
|
import mineplex.core.common.util.UtilMath;
|
||||||
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
||||||
import nautilus.game.arcade.game.games.mineware.Challenge;
|
import nautilus.game.arcade.game.games.mineware.challenge.Challenge;
|
||||||
import nautilus.game.arcade.game.games.mineware.ChallengeType;
|
import nautilus.game.arcade.game.games.mineware.challenge.ChallengeType;
|
||||||
|
|
||||||
public class ChallengeMineADiamond extends Challenge
|
public class ChallengeMineADiamond extends Challenge
|
||||||
{
|
{
|
@ -1,4 +1,4 @@
|
|||||||
package nautilus.game.arcade.game.games.mineware.challenges;
|
package nautilus.game.arcade.game.games.mineware.challenge.type;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
@ -26,8 +26,8 @@ import mineplex.core.common.util.UtilTextMiddle;
|
|||||||
import mineplex.core.updater.UpdateType;
|
import mineplex.core.updater.UpdateType;
|
||||||
import mineplex.core.updater.event.UpdateEvent;
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
||||||
import nautilus.game.arcade.game.games.mineware.Challenge;
|
import nautilus.game.arcade.game.games.mineware.challenge.Challenge;
|
||||||
import nautilus.game.arcade.game.games.mineware.ChallengeType;
|
import nautilus.game.arcade.game.games.mineware.challenge.ChallengeType;
|
||||||
import net.minecraft.server.v1_8_R3.BlockPosition;
|
import net.minecraft.server.v1_8_R3.BlockPosition;
|
||||||
import net.minecraft.server.v1_8_R3.PacketPlayOutWorldEvent;
|
import net.minecraft.server.v1_8_R3.PacketPlayOutWorldEvent;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package nautilus.game.arcade.game.games.mineware.challenges;
|
package nautilus.game.arcade.game.games.mineware.challenge.type;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
@ -21,8 +21,8 @@ import mineplex.core.itemstack.ItemBuilder;
|
|||||||
import mineplex.core.updater.UpdateType;
|
import mineplex.core.updater.UpdateType;
|
||||||
import mineplex.core.updater.event.UpdateEvent;
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
||||||
import nautilus.game.arcade.game.games.mineware.Challenge;
|
import nautilus.game.arcade.game.games.mineware.challenge.Challenge;
|
||||||
import nautilus.game.arcade.game.games.mineware.ChallengeType;
|
import nautilus.game.arcade.game.games.mineware.challenge.ChallengeType;
|
||||||
|
|
||||||
public class ChallengeMiniOneInTheQuiver extends Challenge
|
public class ChallengeMiniOneInTheQuiver extends Challenge
|
||||||
{
|
{
|
@ -1,4 +1,4 @@
|
|||||||
package nautilus.game.arcade.game.games.mineware.challenges;
|
package nautilus.game.arcade.game.games.mineware.challenge.type;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@ -13,8 +13,8 @@ import org.bukkit.event.player.PlayerMoveEvent;
|
|||||||
|
|
||||||
import mineplex.core.common.util.UtilPlayer;
|
import mineplex.core.common.util.UtilPlayer;
|
||||||
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
||||||
import nautilus.game.arcade.game.games.mineware.Challenge;
|
import nautilus.game.arcade.game.games.mineware.challenge.Challenge;
|
||||||
import nautilus.game.arcade.game.games.mineware.ChallengeType;
|
import nautilus.game.arcade.game.games.mineware.challenge.ChallengeType;
|
||||||
|
|
||||||
public class ChallengeNavigateMaze extends Challenge
|
public class ChallengeNavigateMaze extends Challenge
|
||||||
{
|
{
|
@ -1,4 +1,4 @@
|
|||||||
package nautilus.game.arcade.game.games.mineware.challenges;
|
package nautilus.game.arcade.game.games.mineware.challenge.type;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
@ -17,8 +17,8 @@ import mineplex.core.common.util.UtilTextMiddle;
|
|||||||
import mineplex.core.updater.UpdateType;
|
import mineplex.core.updater.UpdateType;
|
||||||
import mineplex.core.updater.event.UpdateEvent;
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
||||||
import nautilus.game.arcade.game.games.mineware.Challenge;
|
import nautilus.game.arcade.game.games.mineware.challenge.Challenge;
|
||||||
import nautilus.game.arcade.game.games.mineware.ChallengeType;
|
import nautilus.game.arcade.game.games.mineware.challenge.ChallengeType;
|
||||||
|
|
||||||
public class ChallengePickASide extends Challenge
|
public class ChallengePickASide extends Challenge
|
||||||
{
|
{
|
@ -1,4 +1,4 @@
|
|||||||
package nautilus.game.arcade.game.games.mineware.challenges;
|
package nautilus.game.arcade.game.games.mineware.challenge.type;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@ -19,8 +19,8 @@ import mineplex.core.updater.UpdateType;
|
|||||||
import mineplex.core.updater.event.UpdateEvent;
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||||
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
||||||
import nautilus.game.arcade.game.games.mineware.Challenge;
|
import nautilus.game.arcade.game.games.mineware.challenge.Challenge;
|
||||||
import nautilus.game.arcade.game.games.mineware.ChallengeType;
|
import nautilus.game.arcade.game.games.mineware.challenge.ChallengeType;
|
||||||
|
|
||||||
public class ChallengePunchThePig extends Challenge
|
public class ChallengePunchThePig extends Challenge
|
||||||
{
|
{
|
@ -1,4 +1,4 @@
|
|||||||
package nautilus.game.arcade.game.games.mineware.challenges;
|
package nautilus.game.arcade.game.games.mineware.challenge.type;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
@ -30,8 +30,8 @@ import mineplex.core.common.util.UtilTextMiddle;
|
|||||||
import mineplex.core.updater.UpdateType;
|
import mineplex.core.updater.UpdateType;
|
||||||
import mineplex.core.updater.event.UpdateEvent;
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
||||||
import nautilus.game.arcade.game.games.mineware.Challenge;
|
import nautilus.game.arcade.game.games.mineware.challenge.Challenge;
|
||||||
import nautilus.game.arcade.game.games.mineware.ChallengeType;
|
import nautilus.game.arcade.game.games.mineware.challenge.ChallengeType;
|
||||||
import net.md_5.bungee.api.ChatColor;
|
import net.md_5.bungee.api.ChatColor;
|
||||||
|
|
||||||
public class ChallengeRedLightGreenLight extends Challenge
|
public class ChallengeRedLightGreenLight extends Challenge
|
@ -1,4 +1,4 @@
|
|||||||
package nautilus.game.arcade.game.games.mineware.challenges;
|
package nautilus.game.arcade.game.games.mineware.challenge.type;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
@ -27,8 +27,8 @@ import mineplex.core.updater.UpdateType;
|
|||||||
import mineplex.core.updater.event.UpdateEvent;
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||||
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
||||||
import nautilus.game.arcade.game.games.mineware.Challenge;
|
import nautilus.game.arcade.game.games.mineware.challenge.Challenge;
|
||||||
import nautilus.game.arcade.game.games.mineware.ChallengeType;
|
import nautilus.game.arcade.game.games.mineware.challenge.ChallengeType;
|
||||||
|
|
||||||
public class ChallengeReverseTag extends Challenge
|
public class ChallengeReverseTag extends Challenge
|
||||||
{
|
{
|
@ -1,4 +1,4 @@
|
|||||||
package nautilus.game.arcade.game.games.mineware.challenges;
|
package nautilus.game.arcade.game.games.mineware.challenge.type;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@ -18,8 +18,8 @@ import mineplex.core.common.util.C;
|
|||||||
import mineplex.core.common.util.UtilTextMiddle;
|
import mineplex.core.common.util.UtilTextMiddle;
|
||||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||||
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
||||||
import nautilus.game.arcade.game.games.mineware.Challenge;
|
import nautilus.game.arcade.game.games.mineware.challenge.Challenge;
|
||||||
import nautilus.game.arcade.game.games.mineware.ChallengeType;
|
import nautilus.game.arcade.game.games.mineware.challenge.ChallengeType;
|
||||||
|
|
||||||
public class ChallengeRushPush extends Challenge
|
public class ChallengeRushPush extends Challenge
|
||||||
{
|
{
|
@ -1,4 +1,4 @@
|
|||||||
package nautilus.game.arcade.game.games.mineware.challenges;
|
package nautilus.game.arcade.game.games.mineware.challenge.type;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@ -27,8 +27,8 @@ import mineplex.core.updater.UpdateType;
|
|||||||
import mineplex.core.updater.event.UpdateEvent;
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||||
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
||||||
import nautilus.game.arcade.game.games.mineware.Challenge;
|
import nautilus.game.arcade.game.games.mineware.challenge.Challenge;
|
||||||
import nautilus.game.arcade.game.games.mineware.ChallengeType;
|
import nautilus.game.arcade.game.games.mineware.challenge.ChallengeType;
|
||||||
|
|
||||||
public class ChallengeShootChickens extends Challenge
|
public class ChallengeShootChickens extends Challenge
|
||||||
{
|
{
|
@ -1,4 +1,4 @@
|
|||||||
package nautilus.game.arcade.game.games.mineware.challenges;
|
package nautilus.game.arcade.game.games.mineware.challenge.type;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
@ -9,8 +9,8 @@ import org.bukkit.entity.Player;
|
|||||||
|
|
||||||
import mineplex.core.common.util.UtilMath;
|
import mineplex.core.common.util.UtilMath;
|
||||||
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
||||||
import nautilus.game.arcade.game.games.mineware.Challenge;
|
import nautilus.game.arcade.game.games.mineware.challenge.Challenge;
|
||||||
import nautilus.game.arcade.game.games.mineware.ChallengeType;
|
import nautilus.game.arcade.game.games.mineware.challenge.ChallengeType;
|
||||||
|
|
||||||
public class ChallengeSmashOff extends Challenge
|
public class ChallengeSmashOff extends Challenge
|
||||||
{
|
{
|
@ -1,4 +1,4 @@
|
|||||||
package nautilus.game.arcade.game.games.mineware.challenges;
|
package nautilus.game.arcade.game.games.mineware.challenge.type;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
@ -13,8 +13,8 @@ import org.bukkit.event.player.PlayerInteractEvent;
|
|||||||
import mineplex.core.common.util.UtilMath;
|
import mineplex.core.common.util.UtilMath;
|
||||||
import mineplex.core.common.util.UtilPlayer;
|
import mineplex.core.common.util.UtilPlayer;
|
||||||
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
||||||
import nautilus.game.arcade.game.games.mineware.Challenge;
|
import nautilus.game.arcade.game.games.mineware.challenge.Challenge;
|
||||||
import nautilus.game.arcade.game.games.mineware.ChallengeType;
|
import nautilus.game.arcade.game.games.mineware.challenge.ChallengeType;
|
||||||
|
|
||||||
public class ChallengeSpleef extends Challenge
|
public class ChallengeSpleef extends Challenge
|
||||||
{
|
{
|
@ -1,4 +1,4 @@
|
|||||||
package nautilus.game.arcade.game.games.mineware.challenges;
|
package nautilus.game.arcade.game.games.mineware.challenge.type;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
@ -20,8 +20,8 @@ import mineplex.core.common.util.UtilTextBottom;
|
|||||||
import mineplex.core.updater.UpdateType;
|
import mineplex.core.updater.UpdateType;
|
||||||
import mineplex.core.updater.event.UpdateEvent;
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
||||||
import nautilus.game.arcade.game.games.mineware.Challenge;
|
import nautilus.game.arcade.game.games.mineware.challenge.Challenge;
|
||||||
import nautilus.game.arcade.game.games.mineware.ChallengeType;
|
import nautilus.game.arcade.game.games.mineware.challenge.ChallengeType;
|
||||||
|
|
||||||
public class ChallengeStandOnColor extends Challenge
|
public class ChallengeStandOnColor extends Challenge
|
||||||
{
|
{
|
@ -1,4 +1,4 @@
|
|||||||
package nautilus.game.arcade.game.games.mineware.challenges;
|
package nautilus.game.arcade.game.games.mineware.challenge.type;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@ -25,8 +25,8 @@ import mineplex.core.common.util.UtilShapes;
|
|||||||
import mineplex.core.recharge.Recharge;
|
import mineplex.core.recharge.Recharge;
|
||||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||||
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
||||||
import nautilus.game.arcade.game.games.mineware.Challenge;
|
import nautilus.game.arcade.game.games.mineware.challenge.Challenge;
|
||||||
import nautilus.game.arcade.game.games.mineware.ChallengeType;
|
import nautilus.game.arcade.game.games.mineware.challenge.ChallengeType;
|
||||||
|
|
||||||
public class ChallengeTntLauncher extends Challenge
|
public class ChallengeTntLauncher extends Challenge
|
||||||
{
|
{
|
@ -1,4 +1,4 @@
|
|||||||
package nautilus.game.arcade.game.games.mineware.challenges;
|
package nautilus.game.arcade.game.games.mineware.challenge.type;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
@ -25,8 +25,8 @@ import mineplex.core.common.util.UtilMath;
|
|||||||
import mineplex.core.common.util.UtilShapes;
|
import mineplex.core.common.util.UtilShapes;
|
||||||
import mineplex.core.common.util.UtilTextMiddle;
|
import mineplex.core.common.util.UtilTextMiddle;
|
||||||
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
||||||
import nautilus.game.arcade.game.games.mineware.Challenge;
|
import nautilus.game.arcade.game.games.mineware.challenge.Challenge;
|
||||||
import nautilus.game.arcade.game.games.mineware.ChallengeType;
|
import nautilus.game.arcade.game.games.mineware.challenge.ChallengeType;
|
||||||
|
|
||||||
public class ChallengeTreasureDigger extends Challenge
|
public class ChallengeTreasureDigger extends Challenge
|
||||||
{
|
{
|
@ -1,4 +1,4 @@
|
|||||||
package nautilus.game.arcade.game.games.mineware.challenges;
|
package nautilus.game.arcade.game.games.mineware.challenge.type;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
@ -37,8 +37,8 @@ import mineplex.core.updater.UpdateType;
|
|||||||
import mineplex.core.updater.event.UpdateEvent;
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||||
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
||||||
import nautilus.game.arcade.game.games.mineware.Challenge;
|
import nautilus.game.arcade.game.games.mineware.challenge.Challenge;
|
||||||
import nautilus.game.arcade.game.games.mineware.ChallengeType;
|
import nautilus.game.arcade.game.games.mineware.challenge.ChallengeType;
|
||||||
|
|
||||||
public class ChallengeVolleyPig extends Challenge
|
public class ChallengeVolleyPig extends Challenge
|
||||||
{
|
{
|
@ -1,4 +1,4 @@
|
|||||||
package nautilus.game.arcade.game.games.mineware.challenges;
|
package nautilus.game.arcade.game.games.mineware.challenge.type;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@ -29,8 +29,8 @@ import mineplex.core.explosion.ExplosionEvent;
|
|||||||
import mineplex.core.updater.UpdateType;
|
import mineplex.core.updater.UpdateType;
|
||||||
import mineplex.core.updater.event.UpdateEvent;
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
||||||
import nautilus.game.arcade.game.games.mineware.Challenge;
|
import nautilus.game.arcade.game.games.mineware.challenge.Challenge;
|
||||||
import nautilus.game.arcade.game.games.mineware.ChallengeType;
|
import nautilus.game.arcade.game.games.mineware.challenge.ChallengeType;
|
||||||
|
|
||||||
public class ChallengeWaterHorror extends Challenge
|
public class ChallengeWaterHorror extends Challenge
|
||||||
{
|
{
|
@ -1,4 +1,4 @@
|
|||||||
package nautilus.game.arcade.game.games.mineware.challenges;
|
package nautilus.game.arcade.game.games.mineware.challenge.type;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
@ -19,8 +19,8 @@ import org.bukkit.util.Vector;
|
|||||||
import mineplex.core.common.util.UtilMath;
|
import mineplex.core.common.util.UtilMath;
|
||||||
import mineplex.core.projectile.ProjectileUser;
|
import mineplex.core.projectile.ProjectileUser;
|
||||||
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
||||||
import nautilus.game.arcade.game.games.mineware.Challenge;
|
import nautilus.game.arcade.game.games.mineware.challenge.Challenge;
|
||||||
import nautilus.game.arcade.game.games.mineware.ChallengeType;
|
import nautilus.game.arcade.game.games.mineware.challenge.ChallengeType;
|
||||||
import nautilus.game.arcade.game.games.mineware.events.ChallengeEndEvent;
|
import nautilus.game.arcade.game.games.mineware.events.ChallengeEndEvent;
|
||||||
|
|
||||||
public class ChallengeWaveCrush extends Challenge
|
public class ChallengeWaveCrush extends Challenge
|
@ -1,4 +1,4 @@
|
|||||||
package nautilus.game.arcade.game.games.mineware.challenges;
|
package nautilus.game.arcade.game.games.mineware.challenge.type;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
@ -1,4 +1,4 @@
|
|||||||
package nautilus.game.arcade.game.games.mineware.challenges.removed;
|
package nautilus.game.arcade.game.games.mineware.challenge.type.removed;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@ -30,8 +30,8 @@ import mineplex.core.common.util.UtilServer;
|
|||||||
import mineplex.core.common.util.UtilShapes;
|
import mineplex.core.common.util.UtilShapes;
|
||||||
import mineplex.core.itemstack.ItemBuilder;
|
import mineplex.core.itemstack.ItemBuilder;
|
||||||
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
||||||
import nautilus.game.arcade.game.games.mineware.Challenge;
|
import nautilus.game.arcade.game.games.mineware.challenge.Challenge;
|
||||||
import nautilus.game.arcade.game.games.mineware.ChallengeType;
|
import nautilus.game.arcade.game.games.mineware.challenge.ChallengeType;
|
||||||
|
|
||||||
public class ChallengeBlockShot extends Challenge
|
public class ChallengeBlockShot extends Challenge
|
||||||
{
|
{
|
@ -1,4 +1,4 @@
|
|||||||
package nautilus.game.arcade.game.games.mineware.challenges.removed;
|
package nautilus.game.arcade.game.games.mineware.challenge.type.removed;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@ -9,8 +9,8 @@ import org.bukkit.Material;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
||||||
import nautilus.game.arcade.game.games.mineware.ChallengeSeperateRooms;
|
import nautilus.game.arcade.game.games.mineware.challenge.ChallengeType;
|
||||||
import nautilus.game.arcade.game.games.mineware.ChallengeType;
|
import nautilus.game.arcade.game.games.mineware.challenge.other.ChallengeSeperateRooms;
|
||||||
|
|
||||||
public class ChallengeBuildBuilding extends ChallengeSeperateRooms
|
public class ChallengeBuildBuilding extends ChallengeSeperateRooms
|
||||||
{
|
{
|
@ -1,4 +1,4 @@
|
|||||||
package nautilus.game.arcade.game.games.mineware.challenges.removed;
|
package nautilus.game.arcade.game.games.mineware.challenge.type.removed;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
@ -16,8 +16,8 @@ import mineplex.core.common.util.UtilShapes;
|
|||||||
import mineplex.core.updater.UpdateType;
|
import mineplex.core.updater.UpdateType;
|
||||||
import mineplex.core.updater.event.UpdateEvent;
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
||||||
import nautilus.game.arcade.game.games.mineware.Challenge;
|
import nautilus.game.arcade.game.games.mineware.challenge.Challenge;
|
||||||
import nautilus.game.arcade.game.games.mineware.ChallengeType;
|
import nautilus.game.arcade.game.games.mineware.challenge.ChallengeType;
|
||||||
|
|
||||||
public class ChallengeChickenFishing extends Challenge
|
public class ChallengeChickenFishing extends Challenge
|
||||||
{
|
{
|
@ -1,4 +1,4 @@
|
|||||||
package nautilus.game.arcade.game.games.mineware.challenges.removed;
|
package nautilus.game.arcade.game.games.mineware.challenge.type.removed;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
@ -17,8 +17,8 @@ import org.bukkit.inventory.ItemStack;
|
|||||||
import mineplex.core.common.util.UtilInv;
|
import mineplex.core.common.util.UtilInv;
|
||||||
import mineplex.core.common.util.UtilMath;
|
import mineplex.core.common.util.UtilMath;
|
||||||
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
||||||
import nautilus.game.arcade.game.games.mineware.Challenge;
|
import nautilus.game.arcade.game.games.mineware.challenge.Challenge;
|
||||||
import nautilus.game.arcade.game.games.mineware.ChallengeType;
|
import nautilus.game.arcade.game.games.mineware.challenge.ChallengeType;
|
||||||
|
|
||||||
public class ChallengeDiamondFall extends Challenge
|
public class ChallengeDiamondFall extends Challenge
|
||||||
{
|
{
|
@ -1,4 +1,4 @@
|
|||||||
package nautilus.game.arcade.game.games.mineware.challenges.removed;
|
package nautilus.game.arcade.game.games.mineware.challenge.type.removed;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@ -15,8 +15,8 @@ import mineplex.core.common.util.UtilMath;
|
|||||||
import mineplex.core.common.util.UtilPlayer;
|
import mineplex.core.common.util.UtilPlayer;
|
||||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||||
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
||||||
import nautilus.game.arcade.game.games.mineware.Challenge;
|
import nautilus.game.arcade.game.games.mineware.challenge.Challenge;
|
||||||
import nautilus.game.arcade.game.games.mineware.ChallengeType;
|
import nautilus.game.arcade.game.games.mineware.challenge.ChallengeType;
|
||||||
|
|
||||||
public class ChallengeHitTargets extends Challenge
|
public class ChallengeHitTargets extends Challenge
|
||||||
{
|
{
|
@ -1,4 +1,4 @@
|
|||||||
package nautilus.game.arcade.game.games.mineware.challenges.removed;
|
package nautilus.game.arcade.game.games.mineware.challenge.type.removed;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
@ -26,8 +26,8 @@ import mineplex.core.updater.UpdateType;
|
|||||||
import mineplex.core.updater.event.UpdateEvent;
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||||
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
||||||
import nautilus.game.arcade.game.games.mineware.ChallengeSeperateRooms;
|
import nautilus.game.arcade.game.games.mineware.challenge.ChallengeType;
|
||||||
import nautilus.game.arcade.game.games.mineware.ChallengeType;
|
import nautilus.game.arcade.game.games.mineware.challenge.other.ChallengeSeperateRooms;
|
||||||
|
|
||||||
public class ChallengeNameThatSound extends ChallengeSeperateRooms
|
public class ChallengeNameThatSound extends ChallengeSeperateRooms
|
||||||
{
|
{
|
@ -1,4 +1,4 @@
|
|||||||
package nautilus.game.arcade.game.games.mineware.challenges;
|
package nautilus.game.arcade.game.games.mineware.challenge.type.removed;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@ -19,8 +19,8 @@ import mineplex.core.common.util.UtilTime;
|
|||||||
import mineplex.core.updater.UpdateType;
|
import mineplex.core.updater.UpdateType;
|
||||||
import mineplex.core.updater.event.UpdateEvent;
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
||||||
import nautilus.game.arcade.game.games.mineware.Challenge;
|
import nautilus.game.arcade.game.games.mineware.challenge.Challenge;
|
||||||
import nautilus.game.arcade.game.games.mineware.ChallengeType;
|
import nautilus.game.arcade.game.games.mineware.challenge.ChallengeType;
|
||||||
|
|
||||||
public class ChallengeRunner extends Challenge
|
public class ChallengeRunner extends Challenge
|
||||||
{
|
{
|
@ -1,4 +1,4 @@
|
|||||||
package nautilus.game.arcade.game.games.mineware.challenges.removed;
|
package nautilus.game.arcade.game.games.mineware.challenge.type.removed;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@ -34,8 +34,8 @@ import mineplex.core.common.util.UtilMath;
|
|||||||
import mineplex.core.common.util.UtilTextBottom;
|
import mineplex.core.common.util.UtilTextBottom;
|
||||||
import mineplex.core.updater.event.UpdateEvent;
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
||||||
import nautilus.game.arcade.game.games.mineware.Challenge;
|
import nautilus.game.arcade.game.games.mineware.challenge.Challenge;
|
||||||
import nautilus.game.arcade.game.games.mineware.ChallengeType;
|
import nautilus.game.arcade.game.games.mineware.challenge.ChallengeType;
|
||||||
import nautilus.game.arcade.game.games.mineware.events.ChallengeEndEvent;
|
import nautilus.game.arcade.game.games.mineware.events.ChallengeEndEvent;
|
||||||
|
|
||||||
public class ChallengeSimonSays extends Challenge
|
public class ChallengeSimonSays extends Challenge
|
@ -1,4 +1,4 @@
|
|||||||
package nautilus.game.arcade.game.games.mineware.challenges.removed;
|
package nautilus.game.arcade.game.games.mineware.challenge.type.removed;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
@ -14,8 +14,8 @@ import mineplex.core.updater.UpdateType;
|
|||||||
import mineplex.core.updater.event.UpdateEvent;
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||||
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
||||||
import nautilus.game.arcade.game.games.mineware.Challenge;
|
import nautilus.game.arcade.game.games.mineware.challenge.Challenge;
|
||||||
import nautilus.game.arcade.game.games.mineware.ChallengeType;
|
import nautilus.game.arcade.game.games.mineware.challenge.ChallengeType;
|
||||||
|
|
||||||
public class ChallengeSkyFall extends Challenge
|
public class ChallengeSkyFall extends Challenge
|
||||||
{
|
{
|
@ -1,4 +1,4 @@
|
|||||||
package nautilus.game.arcade.game.games.mineware.challenges.removed;
|
package nautilus.game.arcade.game.games.mineware.challenge.type.removed;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
@ -19,8 +19,8 @@ import org.bukkit.inventory.ItemStack;
|
|||||||
import mineplex.core.common.util.C;
|
import mineplex.core.common.util.C;
|
||||||
import mineplex.core.common.util.UtilMath;
|
import mineplex.core.common.util.UtilMath;
|
||||||
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
||||||
import nautilus.game.arcade.game.games.mineware.Challenge;
|
import nautilus.game.arcade.game.games.mineware.challenge.Challenge;
|
||||||
import nautilus.game.arcade.game.games.mineware.ChallengeType;
|
import nautilus.game.arcade.game.games.mineware.challenge.ChallengeType;
|
||||||
|
|
||||||
public class ChallengeTameTheWolf extends Challenge
|
public class ChallengeTameTheWolf extends Challenge
|
||||||
{
|
{
|
@ -1,139 +0,0 @@
|
|||||||
package nautilus.game.arcade.game.games.mineware.challenges;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
|
|
||||||
import org.bukkit.Location;
|
|
||||||
import org.bukkit.Material;
|
|
||||||
import org.bukkit.block.Block;
|
|
||||||
import org.bukkit.block.BlockFace;
|
|
||||||
import org.bukkit.block.Chest;
|
|
||||||
import org.bukkit.block.DoubleChest;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
import org.bukkit.event.EventHandler;
|
|
||||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
|
||||||
import org.bukkit.inventory.Inventory;
|
|
||||||
import org.bukkit.inventory.ItemStack;
|
|
||||||
|
|
||||||
import mineplex.core.common.util.UtilMath;
|
|
||||||
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
|
||||||
import nautilus.game.arcade.game.games.mineware.Challenge;
|
|
||||||
import nautilus.game.arcade.game.games.mineware.ChallengeType;
|
|
||||||
|
|
||||||
public class ChallengeChestLoot extends Challenge
|
|
||||||
{
|
|
||||||
public ChallengeChestLoot(BawkBawkBattles host)
|
|
||||||
{
|
|
||||||
super(
|
|
||||||
host,
|
|
||||||
ChallengeType.FirstComplete,
|
|
||||||
"Diamond Seeker",
|
|
||||||
"Find a diamond in the chests.");
|
|
||||||
|
|
||||||
Settings.setUseMapHeight();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ArrayList<Location> createSpawns()
|
|
||||||
{
|
|
||||||
ArrayList<Location> spawns = new ArrayList<Location>();
|
|
||||||
|
|
||||||
for (int x = -(getArenaSize() - 1); x <= getArenaSize() - 1; x++)
|
|
||||||
{
|
|
||||||
for (int z = -(getArenaSize() - 1); z <= getArenaSize() - 1; z++)
|
|
||||||
{
|
|
||||||
if (x % 2 == 0 && z % 2 == 0)
|
|
||||||
{
|
|
||||||
spawns.add(getCenter().clone().add(x + 0.5, 2.1, z + 0.5));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return spawns;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onEnd()
|
|
||||||
{
|
|
||||||
Host.InventoryOpenChest = false;
|
|
||||||
Host.InventoryOpenBlock = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onStart()
|
|
||||||
{
|
|
||||||
Host.InventoryOpenChest = true;
|
|
||||||
Host.InventoryOpenBlock = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@EventHandler
|
|
||||||
public void onInventoryClick(InventoryClickEvent event)
|
|
||||||
{
|
|
||||||
if (!(event.getInventory().getHolder() instanceof Player))
|
|
||||||
{
|
|
||||||
event.setCancelled(true);
|
|
||||||
|
|
||||||
if (event.getInventory().getHolder() instanceof DoubleChest || event.getInventory().getHolder() instanceof Chest)
|
|
||||||
{
|
|
||||||
if (event.getCurrentItem() != null && event.getCurrentItem().getType() == Material.DIAMOND)
|
|
||||||
{
|
|
||||||
event.setCurrentItem(new ItemStack(Material.AIR));
|
|
||||||
setCompleted((Player) event.getWhoClicked());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void createMap()
|
|
||||||
{
|
|
||||||
ArrayList<Inventory> invs = new ArrayList<Inventory>();
|
|
||||||
|
|
||||||
for (int x = -getArenaSize(); x <= getArenaSize(); x++)
|
|
||||||
{
|
|
||||||
for (int z = -getArenaSize(); z <= getArenaSize(); z++)
|
|
||||||
{
|
|
||||||
Block b = getCenter().getBlock().getRelative(x, 0, z);
|
|
||||||
b.setType(Material.STAINED_CLAY);
|
|
||||||
b.setData((byte) UtilMath.r(16));
|
|
||||||
|
|
||||||
addBlock(b);
|
|
||||||
|
|
||||||
if (Math.abs(x) % 2 == 0 && Math.abs(z) % 2 == 0)
|
|
||||||
{
|
|
||||||
Block block = b.getRelative(0, 1, 0);
|
|
||||||
block.setType(Material.CHEST);
|
|
||||||
addBlock(block);
|
|
||||||
|
|
||||||
Inventory inventory = ((Chest) block.getState()).getInventory();
|
|
||||||
invs.add(inventory);
|
|
||||||
|
|
||||||
for (int i = 0; i < inventory.getSize(); i++)
|
|
||||||
{
|
|
||||||
ItemStack item = new ItemStack(Material.values()[UtilMath.r(Material.values().length)]);
|
|
||||||
|
|
||||||
if (item.getType() == Material.DIAMOND || item.getType() == Material.AIR)
|
|
||||||
{
|
|
||||||
i--;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
inventory.setItem(i, item);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Block block = b.getRelative(BlockFace.UP);
|
|
||||||
block.setType(Material.STAINED_CLAY);
|
|
||||||
block.setData((byte) UtilMath.r(16));
|
|
||||||
addBlock(block);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int i = 0; i < 10 + getChallengers().size(); i++)
|
|
||||||
{
|
|
||||||
Inventory inv = invs.get(UtilMath.r(invs.size()));
|
|
||||||
inv.setItem(UtilMath.r(inv.getSize()), new ItemStack(Material.DIAMOND));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,171 +0,0 @@
|
|||||||
package nautilus.game.arcade.game.games.mineware.challenges;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
|
|
||||||
import org.bukkit.Location;
|
|
||||||
import org.bukkit.Material;
|
|
||||||
import org.bukkit.block.Block;
|
|
||||||
import org.bukkit.block.BlockFace;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
import org.bukkit.event.EventHandler;
|
|
||||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
|
||||||
|
|
||||||
import mineplex.core.common.util.UtilMath;
|
|
||||||
import mineplex.core.common.util.UtilShapes;
|
|
||||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
|
||||||
import nautilus.game.arcade.game.games.mineware.BawkBawkBattles;
|
|
||||||
import nautilus.game.arcade.game.games.mineware.Challenge;
|
|
||||||
import nautilus.game.arcade.game.games.mineware.ChallengeType;
|
|
||||||
|
|
||||||
public class ChallengeCloudFall extends Challenge
|
|
||||||
{
|
|
||||||
public ChallengeCloudFall(BawkBawkBattles host)
|
|
||||||
{
|
|
||||||
super(
|
|
||||||
host,
|
|
||||||
ChallengeType.FirstComplete,
|
|
||||||
"Cloud Fall",
|
|
||||||
"Jump and land on green wool.",
|
|
||||||
"Avoid the deadly clouds!");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ArrayList<Location> createSpawns()
|
|
||||||
{
|
|
||||||
{
|
|
||||||
ArrayList<Location> spawns = new ArrayList<Location>();
|
|
||||||
for (int x = -(getArenaSize() - 1); x <= getArenaSize(); x++)
|
|
||||||
{
|
|
||||||
for (int z = -(getArenaSize() - 1); z <= getArenaSize(); z++)
|
|
||||||
{
|
|
||||||
boolean goodSpawn = true;
|
|
||||||
int y = 73;
|
|
||||||
if (x % 2 == 0 && z % 2 == 0)
|
|
||||||
{
|
|
||||||
while (Host.WorldData.World.getBlockAt(x, y, z).getType() == Material.AIR)
|
|
||||||
{
|
|
||||||
if (y > 76)
|
|
||||||
{
|
|
||||||
goodSpawn = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
y++;
|
|
||||||
}
|
|
||||||
if (goodSpawn)
|
|
||||||
{
|
|
||||||
spawns.add(getCenter().clone().add(x + 0.5, y + 1.1, z + 0.5));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return spawns;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onEnd()
|
|
||||||
{
|
|
||||||
Host.DamageFall = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onStart()
|
|
||||||
{
|
|
||||||
Host.DamageFall = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
@Override
|
|
||||||
public void createMap()
|
|
||||||
{
|
|
||||||
for (int x = -getArenaSize(); x <= getArenaSize(); x++)
|
|
||||||
{
|
|
||||||
for (int z = -getArenaSize(); z <= getArenaSize(); z++)
|
|
||||||
{
|
|
||||||
for (int y = 0; y <= 75; y++)
|
|
||||||
{
|
|
||||||
Block b = getCenter().getBlock().getRelative(x, y, z);
|
|
||||||
|
|
||||||
if (y == 0)
|
|
||||||
{
|
|
||||||
b.setType(Material.WOOL);
|
|
||||||
}
|
|
||||||
else if (y == 1 && Math.abs(x) < getArenaSize() - 2 && Math.abs(z) < getArenaSize() - 2)
|
|
||||||
{
|
|
||||||
if (UtilMath.r(8) == 0)
|
|
||||||
{
|
|
||||||
b.setType(Material.WOOL);
|
|
||||||
b.setData((byte) 5);
|
|
||||||
|
|
||||||
b.getRelative(BlockFace.UP).setType(Material.WOOL);
|
|
||||||
b.getRelative(BlockFace.UP).setData((byte) 5);
|
|
||||||
addBlock(b.getRelative(BlockFace.UP));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (y > 10 && y < 70)
|
|
||||||
{
|
|
||||||
if (UtilMath.r(200) == 1)
|
|
||||||
{
|
|
||||||
// RIP DRY rule ;-;. plz don't hurt me :(
|
|
||||||
b.getRelative(BlockFace.NORTH).setType(Material.STAINED_CLAY);
|
|
||||||
b.getRelative(BlockFace.EAST).setType(Material.STAINED_CLAY);
|
|
||||||
b.getRelative(BlockFace.WEST).setType(Material.STAINED_CLAY);
|
|
||||||
b.getRelative(BlockFace.SOUTH).setType(Material.STAINED_CLAY);
|
|
||||||
|
|
||||||
addBlock(b.getRelative(BlockFace.NORTH));
|
|
||||||
addBlock(b.getRelative(BlockFace.EAST));
|
|
||||||
addBlock(b.getRelative(BlockFace.WEST));
|
|
||||||
addBlock(b.getRelative(BlockFace.SOUTH));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
addBlock(b);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// The spawning platform
|
|
||||||
int size = 8;
|
|
||||||
for (Location locs : UtilShapes.getCircle(getCenter().add(0, 13, 0), false, size))
|
|
||||||
{
|
|
||||||
locs.getBlock().setType(Material.WOOL);
|
|
||||||
locs.getBlock().setData((byte) UtilMath.r(16));
|
|
||||||
addBlock(locs.getBlock());
|
|
||||||
}
|
|
||||||
for (Location locs : UtilShapes.getCircle(getCenter().add(0, 13, 0), false, size / 2))
|
|
||||||
{
|
|
||||||
locs.getBlock().setType(Material.AIR);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@EventHandler
|
|
||||||
public void onfallDamage(CustomDamageEvent event)
|
|
||||||
{
|
|
||||||
if (!Host.IsLive())
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!(event.GetDamageeEntity() instanceof Player))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (event.GetCause() != DamageCause.FALL)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (Data.isDone(event.GetDamageePlayer()))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (Math.round(event.GetDamageePlayer().getLocation().getY()) == 3)
|
|
||||||
{
|
|
||||||
event.SetCancelled("fell on wool");
|
|
||||||
setCompleted(event.GetDamageePlayer());
|
|
||||||
}
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// event.AddMod("Increased Damage", "Missed jump", 2, false);
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
}
|
|
@ -3,7 +3,7 @@ package nautilus.game.arcade.game.games.mineware.events;
|
|||||||
import org.bukkit.event.Event;
|
import org.bukkit.event.Event;
|
||||||
import org.bukkit.event.HandlerList;
|
import org.bukkit.event.HandlerList;
|
||||||
|
|
||||||
import nautilus.game.arcade.game.games.mineware.Challenge;
|
import nautilus.game.arcade.game.games.mineware.challenge.Challenge;
|
||||||
|
|
||||||
public class ChallengeEndEvent extends Event
|
public class ChallengeEndEvent extends Event
|
||||||
{
|
{
|
||||||
|
@ -3,7 +3,7 @@ package nautilus.game.arcade.game.games.mineware.events;
|
|||||||
import org.bukkit.event.Event;
|
import org.bukkit.event.Event;
|
||||||
import org.bukkit.event.HandlerList;
|
import org.bukkit.event.HandlerList;
|
||||||
|
|
||||||
import nautilus.game.arcade.game.games.mineware.Challenge;
|
import nautilus.game.arcade.game.games.mineware.challenge.Challenge;
|
||||||
|
|
||||||
public class ChallengeStartEvent extends Event
|
public class ChallengeStartEvent extends Event
|
||||||
{
|
{
|
||||||
|
@ -2,8 +2,8 @@ package nautilus.game.arcade.game.games.mineware.stats;
|
|||||||
|
|
||||||
import nautilus.game.arcade.game.Game;
|
import nautilus.game.arcade.game.Game;
|
||||||
import nautilus.game.arcade.game.Game.GameState;
|
import nautilus.game.arcade.game.Game.GameState;
|
||||||
import nautilus.game.arcade.game.games.mineware.Challenge;
|
import nautilus.game.arcade.game.games.mineware.challenge.Challenge;
|
||||||
import nautilus.game.arcade.game.games.mineware.challenges.ChallengeKangarooJump;
|
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeKangarooJump;
|
||||||
import nautilus.game.arcade.game.games.mineware.events.ChallengeEndEvent;
|
import nautilus.game.arcade.game.games.mineware.events.ChallengeEndEvent;
|
||||||
import nautilus.game.arcade.stats.StatTracker;
|
import nautilus.game.arcade.stats.StatTracker;
|
||||||
|
|
||||||
|
@ -2,8 +2,8 @@ package nautilus.game.arcade.game.games.mineware.stats;
|
|||||||
|
|
||||||
import nautilus.game.arcade.game.Game;
|
import nautilus.game.arcade.game.Game;
|
||||||
import nautilus.game.arcade.game.Game.GameState;
|
import nautilus.game.arcade.game.Game.GameState;
|
||||||
import nautilus.game.arcade.game.games.mineware.Challenge;
|
import nautilus.game.arcade.game.games.mineware.challenge.Challenge;
|
||||||
import nautilus.game.arcade.game.games.mineware.challenges.ChallengeNavigateMaze;
|
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeNavigateMaze;
|
||||||
import nautilus.game.arcade.game.games.mineware.events.ChallengeEndEvent;
|
import nautilus.game.arcade.game.games.mineware.events.ChallengeEndEvent;
|
||||||
import nautilus.game.arcade.game.games.mineware.events.ChallengeStartEvent;
|
import nautilus.game.arcade.game.games.mineware.events.ChallengeStartEvent;
|
||||||
import nautilus.game.arcade.stats.StatTracker;
|
import nautilus.game.arcade.stats.StatTracker;
|
||||||
|
@ -6,8 +6,8 @@ import org.bukkit.event.EventPriority;
|
|||||||
|
|
||||||
import nautilus.game.arcade.game.Game;
|
import nautilus.game.arcade.game.Game;
|
||||||
import nautilus.game.arcade.game.Game.GameState;
|
import nautilus.game.arcade.game.Game.GameState;
|
||||||
import nautilus.game.arcade.game.games.mineware.Challenge;
|
import nautilus.game.arcade.game.games.mineware.challenge.Challenge;
|
||||||
import nautilus.game.arcade.game.games.mineware.challenges.ChallengeMilkACow;
|
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeMilkACow;
|
||||||
import nautilus.game.arcade.game.games.mineware.events.ChallengeEndEvent;
|
import nautilus.game.arcade.game.games.mineware.events.ChallengeEndEvent;
|
||||||
import nautilus.game.arcade.stats.StatTracker;
|
import nautilus.game.arcade.stats.StatTracker;
|
||||||
|
|
||||||
|
@ -2,8 +2,8 @@ package nautilus.game.arcade.game.games.mineware.stats;
|
|||||||
|
|
||||||
import nautilus.game.arcade.game.Game;
|
import nautilus.game.arcade.game.Game;
|
||||||
import nautilus.game.arcade.game.Game.GameState;
|
import nautilus.game.arcade.game.Game.GameState;
|
||||||
import nautilus.game.arcade.game.games.mineware.Challenge;
|
import nautilus.game.arcade.game.games.mineware.challenge.Challenge;
|
||||||
import nautilus.game.arcade.game.games.mineware.challenges.ChallengeShootChickens;
|
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeShootChickens;
|
||||||
import nautilus.game.arcade.game.games.mineware.events.ChallengeEndEvent;
|
import nautilus.game.arcade.game.games.mineware.events.ChallengeEndEvent;
|
||||||
import nautilus.game.arcade.stats.StatTracker;
|
import nautilus.game.arcade.stats.StatTracker;
|
||||||
|
|
||||||
|
@ -2,8 +2,8 @@ package nautilus.game.arcade.game.games.mineware.stats;
|
|||||||
|
|
||||||
import nautilus.game.arcade.game.Game;
|
import nautilus.game.arcade.game.Game;
|
||||||
import nautilus.game.arcade.game.Game.GameState;
|
import nautilus.game.arcade.game.Game.GameState;
|
||||||
import nautilus.game.arcade.game.games.mineware.Challenge;
|
import nautilus.game.arcade.game.games.mineware.challenge.Challenge;
|
||||||
import nautilus.game.arcade.game.games.mineware.challenges.ChallengeWaveCrush;
|
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeWaveCrush;
|
||||||
import nautilus.game.arcade.game.games.mineware.events.ChallengeEndEvent;
|
import nautilus.game.arcade.game.games.mineware.events.ChallengeEndEvent;
|
||||||
import nautilus.game.arcade.stats.StatTracker;
|
import nautilus.game.arcade.stats.StatTracker;
|
||||||
|
|
||||||
|
@ -2,8 +2,8 @@ package nautilus.game.arcade.game.games.mineware.stats;
|
|||||||
|
|
||||||
import nautilus.game.arcade.game.Game;
|
import nautilus.game.arcade.game.Game;
|
||||||
import nautilus.game.arcade.game.Game.GameState;
|
import nautilus.game.arcade.game.Game.GameState;
|
||||||
import nautilus.game.arcade.game.games.mineware.Challenge;
|
import nautilus.game.arcade.game.games.mineware.challenge.Challenge;
|
||||||
import nautilus.game.arcade.game.games.mineware.challenges.ChallengeReverseTag;
|
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeReverseTag;
|
||||||
import nautilus.game.arcade.game.games.mineware.events.ChallengeEndEvent;
|
import nautilus.game.arcade.game.games.mineware.events.ChallengeEndEvent;
|
||||||
import nautilus.game.arcade.stats.StatTracker;
|
import nautilus.game.arcade.stats.StatTracker;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user