diff --git a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/api/mothership/Mothership.java b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/api/mothership/Mothership.java deleted file mode 100644 index 356a7a197..000000000 --- a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/api/mothership/Mothership.java +++ /dev/null @@ -1,57 +0,0 @@ -package mineplex.core.common.api.mothership; - -import java.util.UUID; - -import org.bukkit.Bukkit; - -import mineplex.core.common.api.ApiHost; -import mineplex.core.common.api.ApiWebCall; -import mineplex.core.common.util.UtilServer; - -public class Mothership -{ - private static final ApiWebCall API_BASE = new ApiWebCall("http://" + ApiHost.getAPIHost("MOTHERSHIP").getHost() + ":" + ApiHost.getAPIHost("MOTHERSHIP").getPort() + "/"); - - public static void addPlayer(UUID uuid, Runnable afterward) - { - UtilServer.runAsync(() -> - { - Boolean response = API_BASE.get("addPlayer/" + uuid.toString(), Boolean.class); - if (response == null) - { - System.out.println("!!! Issue adding player to Mothership server !!!"); - } - UtilServer.runSync(afterward); - }); - } - - public static boolean isWhitelisted(UUID uuid) - { - if (Bukkit.isPrimaryThread()) - { - throw new IllegalStateException("This method MUST NOT be called from the main thread!"); - } - - Boolean response = API_BASE.get("getPlayer/" + uuid.toString(), Boolean.class); - if (response == null) - { - System.out.println("!!! Issue retrieving player whitelist status. Allowing them in anyway! !!!"); - } - return response == null || response; - } - - public static boolean shouldStartEvent() - { - if (Bukkit.isPrimaryThread()) - { - throw new IllegalStateException("This method MUST NOT be called from the main thread"); - } - - Boolean response = API_BASE.get("startEvent/" + UtilServer.getRegion().toString() + "/" + UtilServer.getServerName(), Boolean.class); - if (response == null) - { - System.out.println("!!! Issue checking whether server should start event. Keeping event disabled! !!!"); - } - return response != null && response; - } -} diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/modules/AlienInvasion.java b/Plugins/Mineplex.Hub/src/mineplex/hub/modules/AlienInvasion.java index 2d510d969..8e022d3fb 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/modules/AlienInvasion.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/modules/AlienInvasion.java @@ -33,8 +33,6 @@ import mineplex.core.blockrestore.BlockRestore; import mineplex.core.command.CommandBase; import mineplex.core.common.Pair; import mineplex.core.common.Rank; -import mineplex.core.common.api.mothership.Mothership; -import mineplex.core.common.api.mothership.MothershipCommand; import mineplex.core.common.block.schematic.Schematic; import mineplex.core.common.block.schematic.SchematicData; import mineplex.core.common.block.schematic.UtilSchematic; @@ -53,7 +51,6 @@ import mineplex.core.updater.UpdateType; import mineplex.core.updater.event.UpdateEvent; import mineplex.core.utils.UtilVariant; import mineplex.hub.server.ServerManager; -import mineplex.serverdata.commands.ServerCommandManager; @ReflectivelyCreateMiniPlugin public class AlienInvasion extends MiniPlugin @@ -155,33 +152,8 @@ public class AlienInvasion extends MiniPlugin stopAnimation(); } }); - ServerCommandManager.getInstance().registerCommandType("mothership", MothershipCommand.class, command -> - { - switch (command.getAction()) - { - case START: - runAsync(() -> - { - if (Mothership.shouldStartEvent()) - { - runSync(this::startAnimation); - } - }, 20L); - break; - case CLEANUP: - runSync(this::stopAnimation); - break; - } - }); - - runAsync(() -> - { - if (Mothership.shouldStartEvent()) - { - runSync(this::startAnimation); - } - }); + startAnimation(); } public void startAnimation() @@ -216,7 +188,7 @@ public class AlienInvasion extends MiniPlugin public void sendPlayerToInstance(Player player) { - Mothership.addPlayer(player.getUniqueId(), () -> _serverManager.selectServer(player, "UFO")); + _serverManager.selectServer(player, "UFO"); } public void stopAnimation() diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/Game.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/Game.java index 80329fe3f..5ee697db6 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/Game.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/Game.java @@ -256,7 +256,7 @@ public abstract class Game extends ListenerComponent implements Lifetimed public long PrepareTime = 9000; public boolean PlaySoundGameStart = true; - public double XpMult = 1; + public double XpMult = 2; public boolean SpeedMeasurement = false; @@ -278,7 +278,7 @@ public abstract class Game extends ListenerComponent implements Lifetimed // Gems public boolean CrownsEnabled = false; - public double GemMultiplier = 1; + public double GemMultiplier = 2; public boolean GemHunterEnabled = true; public boolean GemBoosterEnabled = true; public boolean GemDoubleEnabled = true; diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/alieninvasion/AlienInvasion.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/alieninvasion/AlienInvasion.java index f2ce8350c..898f5490a 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/alieninvasion/AlienInvasion.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/alieninvasion/AlienInvasion.java @@ -19,7 +19,6 @@ import org.bukkit.event.EventHandler; import org.bukkit.event.entity.EntityDamageEvent.DamageCause; import org.bukkit.event.entity.EntitySpawnEvent; import org.bukkit.event.entity.ItemSpawnEvent; -import org.bukkit.event.player.AsyncPlayerPreLoginEvent; import org.bukkit.inventory.ItemStack; import org.bukkit.potion.PotionEffect; import org.bukkit.potion.PotionEffectType; @@ -27,7 +26,6 @@ import org.bukkit.scheduler.BukkitRunnable; import org.bukkit.scoreboard.Team; import mineplex.core.common.Pair; -import mineplex.core.common.api.mothership.Mothership; import mineplex.core.common.util.C; import mineplex.core.common.util.F; import mineplex.core.common.util.UtilAlg; @@ -100,15 +98,6 @@ public class AlienInvasion extends SoloGame .register(this); } - @EventHandler - public void onJoin(AsyncPlayerPreLoginEvent event) - { - if (!Mothership.isWhitelisted(event.getUniqueId())) - { - event.disallow(AsyncPlayerPreLoginEvent.Result.KICK_WHITELIST, "You must join by finding a UFO!"); - } - } - @Override @EventHandler public void ScoreboardUpdate(UpdateEvent event)