diff --git a/Plugins/Mineplex.Core/src/mineplex/core/account/CoreClientManager.java b/Plugins/Mineplex.Core/src/mineplex/core/account/CoreClientManager.java index a95e46cf2..3c01d37a3 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/account/CoreClientManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/account/CoreClientManager.java @@ -373,13 +373,12 @@ public class CoreClientManager extends MiniPlugin // Reserved Slot Check if (Bukkit.getOnlinePlayers().size() >= Bukkit.getServer().getMaxPlayers()) { - // TODO: REMOVE THIS RESTRICTION FROM CLANS-BRANCH, USED TO PREVENT ULTRA FROM JOINING CLANS -// if (client.GetRank().Has(event.getPlayer(), Rank.ULTRA, false)) -// { -// event.allow(); -// event.setResult(PlayerLoginEvent.Result.ALLOWED); -// return; -// } + if (client.GetRank().has(event.getPlayer(), Rank.ULTRA, false)) + { + event.allow(); + event.setResult(PlayerLoginEvent.Result.ALLOWED); + return; + } event.disallow(PlayerLoginEvent.Result.KICK_OTHER, "This server is full and no longer accepts players."); } diff --git a/Plugins/Mineplex.Core/src/mineplex/core/serverConfig/ServerConfiguration.java b/Plugins/Mineplex.Core/src/mineplex/core/serverConfig/ServerConfiguration.java index d5bd71dec..f57097c2d 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/serverConfig/ServerConfiguration.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/serverConfig/ServerConfiguration.java @@ -37,7 +37,6 @@ public class ServerConfiguration extends MiniPlugin if (_serverGroup == null) return; - /* try { _playerListMaxPlayers = PlayerList.class.getDeclaredField("maxPlayers"); @@ -50,9 +49,8 @@ public class ServerConfiguration extends MiniPlugin } _plugin.getServer().setWhitelist(_serverGroup.getWhitelist()); - */ ((CraftServer)_plugin.getServer()).getServer().setPVP(_serverGroup.getPvp()); - //((CraftServer)_plugin.getServer()).getServer().setTexturePack(_serverGroup.getResourcePack()); +// ((CraftServer)_plugin.getServer()).getServer().setResourcePack(_serverGroup.getResourcePack()); } @EventHandler diff --git a/Plugins/Mineplex.Core/src/mineplex/core/teleport/Teleport.java b/Plugins/Mineplex.Core/src/mineplex/core/teleport/Teleport.java index 09aabb2ac..db766014d 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/teleport/Teleport.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/teleport/Teleport.java @@ -4,6 +4,7 @@ import java.util.LinkedList; import java.util.UUID; import mineplex.core.MiniPlugin; +import mineplex.core.account.CoreClientManager; import mineplex.core.teleport.command.LocateCommand; import mineplex.core.teleport.command.TeleportCommand; import mineplex.core.teleport.event.MineplexTeleportEvent; @@ -40,12 +41,14 @@ public class Teleport extends MiniPlugin private NautHashMap> _tpHistory = new NautHashMap>(); private NautHashMap _failedRedisLocates = new NautHashMap(); private String _serverName; + private CoreClientManager _clientManager; - public Teleport(JavaPlugin plugin) + public Teleport(JavaPlugin plugin, CoreClientManager clientManager) { super("Teleport", plugin); _serverName = getPlugin().getConfig().getString("serverstatus.name"); + _clientManager = clientManager; RedisLocateHandler locateHandler = new RedisLocateHandler(this); @@ -295,4 +298,14 @@ public class Teleport extends MiniPlugin { return _tpHistory.get(player.getName()); } + + public String getServerName() + { + return _serverName; + } + + public CoreClientManager getClientManager() + { + return _clientManager; + } } diff --git a/Plugins/Mineplex.Core/src/mineplex/core/teleport/command/TeleportCommand.java b/Plugins/Mineplex.Core/src/mineplex/core/teleport/command/TeleportCommand.java index f9a1ac6e2..600f3fe6b 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/teleport/command/TeleportCommand.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/teleport/command/TeleportCommand.java @@ -6,13 +6,14 @@ import mineplex.core.command.MultiCommandBase; import mineplex.core.common.Rank; import mineplex.core.common.util.F; import mineplex.core.common.util.UtilPlayer; +import mineplex.core.status.ServerStatusManager; import mineplex.core.teleport.Teleport; public class TeleportCommand extends MultiCommandBase { public TeleportCommand(Teleport plugin) { - super(plugin, Rank.ADMIN, "tp", "teleport"); + super(plugin, Rank.MODERATOR, "tp", "teleport"); AddCommand(new AllCommand(plugin)); AddCommand(new BackCommand(plugin)); @@ -22,6 +23,12 @@ public class TeleportCommand extends MultiCommandBase @Override protected void Help(Player caller, String[] args) { + if (Plugin.getServerName().contains("Clans") && !Plugin.getClientManager().hasRank(caller, Rank.ADMIN) && !caller.isOp()) + { + caller.sendMessage(F.main("Clans", "You cannot use /tp in clans!")); + return; + } + //Caller to Player if (args.length == 1 && CommandCenter.GetClientManager().Get(caller).GetRank().has(caller, Rank.MODERATOR, true)) Plugin.playerToPlayer(caller, caller.getName(), args[0]); diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/Clans.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/Clans.java index 5f6fd52d2..2ade3e90f 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/Clans.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/Clans.java @@ -48,7 +48,7 @@ import net.minecraft.server.v1_8_R3.MinecraftServer; public class Clans extends JavaPlugin { - public static final String VERSION = "0.13"; + public static final String VERSION = "0.14"; private String WEB_CONFIG = "webServer"; // Modules @@ -91,7 +91,7 @@ public class Clans extends JavaPlugin new Spawn(this, serverStatusManager.getCurrentServerName()); Give.Initialize(this); - Teleport teleport = new Teleport(this); + Teleport teleport = new Teleport(this, _clientManager); Portal portal = new Portal(this, _clientManager, serverStatusManager.getCurrentServerName()); new FileUpdater(this, portal, serverStatusManager.getCurrentServerName(), serverStatusManager.getRegion()); diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansManager.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansManager.java index f30d1dd02..6557a4c28 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansManager.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansManager.java @@ -65,6 +65,7 @@ import mineplex.game.clans.clans.commands.ClanManagementCommand; import mineplex.game.clans.clans.commands.ClansAllyChatCommand; import mineplex.game.clans.clans.commands.ClansChatCommand; import mineplex.game.clans.clans.commands.ClansCommand; +import mineplex.game.clans.clans.commands.ClansLoginManager; import mineplex.game.clans.clans.commands.KillCommand; import mineplex.game.clans.clans.commands.MapCommand; import mineplex.game.clans.clans.commands.RegionsCommand; @@ -244,7 +245,7 @@ public class ClansManager extends MiniClientPluginimplements IRelati _explosion = new Explosion(plugin, blockRestore); - // new ClansLoginManager(getPlugin(), clientManager, _serverName); + new ClansLoginManager(getPlugin(), clientManager, _serverName); _clanShop = new ClanShop(this, clientManager, donationManager); @@ -950,16 +951,16 @@ public class ClansManager extends MiniClientPluginimplements IRelati public void onJoin(PlayerLoginEvent event) { Rank rank = _clientManager.Get(event.getPlayer()).GetRank(); - if (!event.getPlayer().isWhitelisted() || !rank.has(Rank.EVENT)) + if (!event.getPlayer().isWhitelisted() && !rank.has(Rank.LEGEND)) { - event.setResult(PlayerLoginEvent.Result.KICK_OTHER); + event.disallow(PlayerLoginEvent.Result.KICK_OTHER, "Clans is currently in Legend+ only Alpha!"); // event.setKickMessage("This server is whitelisted!"); - event.setKickMessage("Clans is currently in staff only Pre-Alpha!"); + event.setKickMessage("Clans is currently in Legend+ only Alpha!"); } - else if (UtilServer.getPlayers().length >= UtilServer.getServer().getMaxPlayers() && !rank.has(Rank.ADMIN) && !event.getPlayer().isWhitelisted()) + else if (UtilServer.getPlayers().length >= UtilServer.getServer().getMaxPlayers() && !rank.has(Rank.ADMIN) && !event.getPlayer().isWhitelisted() && !event.getPlayer().isOp()) { - event.setResult(PlayerLoginEvent.Result.KICK_OTHER); - event.setKickMessage("Clans Pre-Alpha is full! Try again soon"); + event.disallow(PlayerLoginEvent.Result.KICK_OTHER, "Clans Alpha is full! Try again soon"); + event.setKickMessage("Clans Alpha is full! Try again soon"); } } diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/commands/ClansLoginManager.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/commands/ClansLoginManager.java index 3b90d62d4..1267209fb 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/commands/ClansLoginManager.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/commands/ClansLoginManager.java @@ -39,12 +39,13 @@ public class ClansLoginManager extends MiniPlugin implements ILoginProcessor @EventHandler public void onPlayerJoin(PlayerLoginEvent event) { - if (_queue.contains(event.getPlayer().getName())) + if (_queue.contains(event.getPlayer().getName()) && !event.getPlayer().isOp()) { -// event.setKickMessage("This is not your Clans home server"); -// event.setResult(PlayerLoginEvent.Result.KICK_OTHER); - _queue.remove(event.getPlayer().getName()); + event.setKickMessage("This is not your Clans home server"); + event.setResult(PlayerLoginEvent.Result.KICK_OTHER); } + + _queue.remove(event.getPlayer().getName()); } private void kickPlayer(final String playerName, final String homeServer) @@ -54,11 +55,11 @@ public class ClansLoginManager extends MiniPlugin implements ILoginProcessor @Override public void run() { -// Player player = UtilPlayer.searchExact(playerName); -// if (player != null && player.isOnline()) -// { -// player.kickPlayer("This is not your home server. To play clans, connect to " + homeServer); -// } + Player player = UtilPlayer.searchExact(playerName); + if (player != null && player.isOnline() && !player.isOp()) + { + player.kickPlayer("This is not your home server. To play clans, connect to " + homeServer); + } } }, 20); } @@ -74,7 +75,6 @@ public class ClansLoginManager extends MiniPlugin implements ILoginProcessor if (serverName != null) { - System.out.println("Player " + playerName + " is from server: " + serverName); if (!serverName.equals(_serverName)) { _queue.add(playerName); diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/regions/ClansRegions.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/regions/ClansRegions.java index 2ea500277..537f21e7c 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/regions/ClansRegions.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/regions/ClansRegions.java @@ -40,7 +40,7 @@ public class ClansRegions extends MiniPlugin { public final static String DEFAULT_WORLD_NAME = "world"; public final static int SPAWN_RADIUS = 3; // Radius of spawn claim area (measured in chunks) - public final static int SHOP_RADIUS = 4; // Radius of shop claim area (measured in chunks) + public final static int SHOP_RADIUS = 7; // Radius of shop claim area (measured in chunks) public final static int FIELDS_RADIUS = 7; // Radius of fields claim area (measured in chunks) public final static int BORDERLANDS_RADIUS = 50; // Radius of borderlands claim area (measured in chunks) public static final int BORDER_RADIUS = 768; diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/scoreboard/ClansScoreboardManager.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/scoreboard/ClansScoreboardManager.java index 4737f9abf..42f3c6d6c 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/scoreboard/ClansScoreboardManager.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/scoreboard/ClansScoreboardManager.java @@ -45,7 +45,7 @@ public class ClansScoreboardManager extends ScoreboardManager ScoreboardData data = getData("default", true); - data.write(C.cGreen + "Clans Pre-Alpha " + Clans.VERSION); + data.write(C.cGreen + "Clans Alpha " + Clans.VERSION); data.writeEmpty(); data.writeElement(new ScoreboardElementClan(_clansManager)); data.writeElement(new ScoreboardElementPlayer(_clansManager)); diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/stuck/commands/StuckCommand.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/stuck/commands/StuckCommand.java index 22ad80ada..f43064682 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/stuck/commands/StuckCommand.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/stuck/commands/StuckCommand.java @@ -33,9 +33,10 @@ public class StuckCommand extends CommandBase return; } - if(ClansManager.getInstance().getClanUtility().getClaim(caller.getLocation()) != null && !ClansManager.getInstance().getClanUtility().getClaim(caller.getLocation()).Owner.equals("Borderlands")) + if(ClansManager.getInstance().getClanUtility().getClaim(caller.getLocation()) != null && !ClansManager.getInstance().getClanUtility().getClaim(caller.getLocation()).Owner.equals("Borderlands") && + !ClansManager.getInstance().getClanUtility().getClaim(caller.getLocation()).Owner.equals("Shops") && !ClansManager.getInstance().getClanUtility().getClaim(caller.getLocation()).Owner.equals("Spawn")) { - UtilPlayer.message(caller, F.main("Clans", "You must be in the Wilderness/Borderlands to use this command.")); + UtilPlayer.message(caller, F.main("Clans", "You must be in the Wilderness/Borderlands/Shops/Spawn to use this command.")); return; } diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/shop/ClansShopItem.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/shop/ClansShopItem.java index d3be0444e..a51346651 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/shop/ClansShopItem.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/shop/ClansShopItem.java @@ -75,7 +75,7 @@ public enum ClansShopItem NETHER_BRICK(50, 10, Material.NETHER_BRICK, 1), QUARTZ_BLOCK(75, 15, Material.QUARTZ_BLOCK, 1), CLAY(30, 6, Material.CLAY, 1), - GOLD_TOKEN(5000, 5000, Material.GOLD_RECORD, 1, (byte) 0, "Gold Token"); + GOLD_TOKEN(50000, 50000, Material.GOLD_RECORD, 1, (byte) 0, "Gold Token"); private int _buyPrice; private int _sellPrice; diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/tutorials/types/TutorialGettingStarted.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/tutorials/types/TutorialGettingStarted.java index 427a6f635..fb17f9fe5 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/tutorials/types/TutorialGettingStarted.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/tutorials/types/TutorialGettingStarted.java @@ -42,13 +42,13 @@ public class TutorialGettingStarted extends Tutorial _doScoreboard = true; _ghostMode = true; - _startOnJoin = false; + _startOnJoin = true; _goldReward = 5000; _uniqueId = "GettingStartedTutorial"; _friendlyName = "Getting Started"; } - + @Override public void onFinished(final Player player) { diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/Hub.java b/Plugins/Mineplex.Hub/src/mineplex/hub/Hub.java index d6d98788a..f52155acb 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/Hub.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/Hub.java @@ -166,7 +166,7 @@ public class Hub extends JavaPlugin implements IRelation conditionManager.setDamageManager(damage); Fire fire = new Fire(this, conditionManager, damage); - Teleport teleport = new Teleport(this); + Teleport teleport = new Teleport(this, clientManager); Energy energy = new Energy(this); energy.setEnabled(false); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/Arcade.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/Arcade.java index fb19678e3..7a710683b 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/Arcade.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/Arcade.java @@ -112,7 +112,7 @@ public class Arcade extends JavaPlugin Creature creature = new Creature(this); ServerStatusManager serverStatusManager = new ServerStatusManager(this, _clientManager, new LagMeter(this, _clientManager)); LeaderboardManager leaderboardManager = new LeaderboardManager(this, _clientManager); - Teleport teleport = new Teleport(this); + Teleport teleport = new Teleport(this, _clientManager); Portal portal = new Portal(this, _clientManager, serverStatusManager.getCurrentServerName()); new FileUpdater(this, portal, serverStatusManager.getCurrentServerName(), serverStatusManager.getRegion()); PacketHandler packetHandler = new PacketHandler(this);