Added missing requirements for SG Achievement Kit

fixed a parkour exploit
This commit is contained in:
Chiss 2014-10-25 10:38:47 +11:00
parent 95937db83a
commit 01f311a3d6
4 changed files with 12 additions and 21 deletions

View File

@ -21,6 +21,7 @@ import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.event.player.PlayerVelocityEvent;
import org.bukkit.potion.PotionEffectType;
import org.bukkit.util.Vector;
import mineplex.core.MiniPlugin;
import mineplex.core.common.util.C;
@ -120,6 +121,8 @@ public class ParkourManager extends MiniPlugin
UtilPlayer.message(player, F.main("Parkour", "You have entered " + F.elem("Parkour Mode") + "."));
Manager.GetGadget().DisableAll(player);
player.setVelocity(new Vector(0,-1,0));
}
else
{

View File

@ -708,18 +708,6 @@ public class ArcadeManager extends MiniPlugin implements IRelation
GetDisguise().undisguise(player);
}
public void RefreshPlayers()
{
for (Player player : UtilServer.getPlayers())
{
for (Player other : UtilServer.getPlayers())
{
player.hidePlayer(other);
player.showPlayer(other);
}
}
}
public ArrayList<String> LoadFiles(String gameName)
{

View File

@ -5,6 +5,7 @@ import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import mineplex.core.achievement.Achievement;
import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.kit.Kit;
import nautilus.game.arcade.kit.KitAvailability;
@ -29,6 +30,14 @@ public class KitHorseman extends Kit
EntityType.HORSE,
new ItemStack(Material.DIAMOND_BARDING));
this.setAchievementRequirements(new Achievement[]
{
Achievement.SURVIVAL_GAMES_BLOODLUST,
Achievement.SURVIVAL_GAMES_LIGHT_WEIGHT,
Achievement.SURVIVAL_GAMES_LOOT,
Achievement.SURVIVAL_GAMES_SKELETONS,
Achievement.SURVIVAL_GAMES_WINS,
});
}
@Override

View File

@ -259,15 +259,6 @@ public class GameManager implements Listener
if (Manager.GetGame() != null && Manager.GetGame().GetState() != GameState.Recruit)
event.setCancelled(true);
}
@EventHandler
public void VisibilityRefresh(GameStateChangeEvent event)
{
if (event.GetState() != GameState.Live)
return;
Manager.RefreshPlayers();
}
@EventHandler
public void KitRegister(GameStateChangeEvent event)