From 69670a4b99a41d7062271275c33e1b55ca262be4 Mon Sep 17 00:00:00 2001 From: cnr Date: Thu, 22 Dec 2016 01:17:44 -0700 Subject: [PATCH 1/3] Pass accountId at community creation time --- .../src/mineplex/core/communities/CommunityManager.java | 3 +-- .../core/communities/commands/CommunityCreateCommand.java | 4 +++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/communities/CommunityManager.java b/Plugins/Mineplex.Core/src/mineplex/core/communities/CommunityManager.java index b4c5e5555..a8bb438a7 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/communities/CommunityManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/communities/CommunityManager.java @@ -586,9 +586,8 @@ public class CommunityManager extends MiniDbClientPlugin new CommunityUpdateMemberRole(community.getId(), sender.getName(), info.UUID.toString(), role.toString()).publish(); } - public void handleCreate(Player sender, String name) + public void handleCreate(Player sender, int accountId, String name) { - int accountId = Managers.get(CoreClientManager.class).getAccountId(sender); runAsync(() -> { _repo.createCommunity(name, accountId, id -> diff --git a/Plugins/Mineplex.Core/src/mineplex/core/communities/commands/CommunityCreateCommand.java b/Plugins/Mineplex.Core/src/mineplex/core/communities/commands/CommunityCreateCommand.java index 35c545edc..5e01f39cb 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/communities/commands/CommunityCreateCommand.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/communities/commands/CommunityCreateCommand.java @@ -6,6 +6,7 @@ import org.bukkit.ChatColor; import org.bukkit.entity.Player; import mineplex.core.Managers; +import mineplex.core.account.CoreClientManager; import mineplex.core.chat.Chat; import mineplex.core.command.CommandBase; import mineplex.core.common.Rank; @@ -52,13 +53,14 @@ public class CommunityCreateCommand extends CommandBase } Plugin.runAsync(() -> { + int accountId = Managers.get(CoreClientManager.class).getAccountId(caller); if (Managers.get(Chat.class).getFilteredMessage(caller, args[0]).contains("*")) { UtilPlayer.message(caller, F.main(Plugin.getName(), "That name is not allowed!")); } else { - Plugin.handleCreate(caller, args[0]); + Plugin.handleCreate(caller, accountId, args[0]); } }); } From 6d5d2b551b88d37a566a2897990ebecf0cace6ff Mon Sep 17 00:00:00 2001 From: William Burns Date: Thu, 22 Dec 2016 17:07:36 +0000 Subject: [PATCH 2/3] Disable communities temporarily. --- .../core/communities/commands/CommunityChatCommand.java | 6 ++++++ .../core/communities/commands/CommunityCommand.java | 6 ++++++ .../core/communities/commands/CommunityCreateCommand.java | 6 ++++++ .../communities/commands/CommunityDescriptionCommand.java | 6 ++++++ .../core/communities/commands/CommunityDisbandCommand.java | 6 ++++++ .../core/communities/commands/CommunityInviteCommand.java | 6 ++++++ .../core/communities/commands/CommunityJoinCommand.java | 6 ++++++ .../core/communities/commands/CommunityMCSCommand.java | 6 ++++++ .../core/communities/commands/CommunityRenameCommand.java | 6 ++++++ .../core/communities/commands/CommunityUnInviteCommand.java | 6 ++++++ .../src/mineplex/game/clans/clans/ClansManager.java | 2 +- Plugins/Mineplex.Hub/src/mineplex/hub/HubManager.java | 2 +- .../src/nautilus/game/arcade/ArcadeManager.java | 2 +- 13 files changed, 63 insertions(+), 3 deletions(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/communities/commands/CommunityChatCommand.java b/Plugins/Mineplex.Core/src/mineplex/core/communities/commands/CommunityChatCommand.java index a1edba960..f9c60a0cf 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/communities/commands/CommunityChatCommand.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/communities/commands/CommunityChatCommand.java @@ -20,6 +20,12 @@ public class CommunityChatCommand extends CommandBase @Override public void Execute(Player caller, String[] args) { + if (true) + { + caller.sendMessage(F.main("Communities", "Coming soon!")); + return; + } + if (args.length < 1) { UtilPlayer.message(caller, F.help("/com chat ", "Selects which community you chat to", Rank.ALL, ChatColor.AQUA)); diff --git a/Plugins/Mineplex.Core/src/mineplex/core/communities/commands/CommunityCommand.java b/Plugins/Mineplex.Core/src/mineplex/core/communities/commands/CommunityCommand.java index 90af36ac7..b0180dfd4 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/communities/commands/CommunityCommand.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/communities/commands/CommunityCommand.java @@ -33,6 +33,12 @@ public class CommunityCommand extends MultiCommandBase @Override protected void Help(Player caller, String[] args) { + if (true) + { + caller.sendMessage(F.main("Communities", "Coming soon!")); + return; + } + if (args.length > 0) { if (args[0].equalsIgnoreCase("help")) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/communities/commands/CommunityCreateCommand.java b/Plugins/Mineplex.Core/src/mineplex/core/communities/commands/CommunityCreateCommand.java index 5e01f39cb..892169a3b 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/communities/commands/CommunityCreateCommand.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/communities/commands/CommunityCreateCommand.java @@ -25,6 +25,12 @@ public class CommunityCreateCommand extends CommandBase @Override public void Execute(Player caller, String[] args) { + if (true) + { + caller.sendMessage(F.main("Communities", "Coming soon!")); + return; + } + if (args.length < 1) { UtilPlayer.message(caller, F.help("/com create ", "Creates a new community", Rank.ETERNAL, ChatColor.AQUA)); diff --git a/Plugins/Mineplex.Core/src/mineplex/core/communities/commands/CommunityDescriptionCommand.java b/Plugins/Mineplex.Core/src/mineplex/core/communities/commands/CommunityDescriptionCommand.java index efaae74b2..e1ccd0656 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/communities/commands/CommunityDescriptionCommand.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/communities/commands/CommunityDescriptionCommand.java @@ -26,6 +26,12 @@ public class CommunityDescriptionCommand extends CommandBase @Override public void Execute(Player caller, String[] args) { + if (true) + { + caller.sendMessage(F.main("Communities", "Coming soon!")); + return; + } + if (args.length < 2) { UtilPlayer.message(caller, F.help("/com description ", "Sets the description of a community you manage", Rank.ALL, ChatColor.AQUA)); diff --git a/Plugins/Mineplex.Core/src/mineplex/core/communities/commands/CommunityDisbandCommand.java b/Plugins/Mineplex.Core/src/mineplex/core/communities/commands/CommunityDisbandCommand.java index a70b77542..2cef1b4ad 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/communities/commands/CommunityDisbandCommand.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/communities/commands/CommunityDisbandCommand.java @@ -24,6 +24,12 @@ public class CommunityDisbandCommand extends CommandBase @Override public void Execute(Player caller, String[] args) { + if (true) + { + caller.sendMessage(F.main("Communities", "Coming soon!")); + return; + } + if (args.length < 1) { UtilPlayer.message(caller, F.help("/com disband ", "Disbands a community you own", Rank.ETERNAL, ChatColor.AQUA)); diff --git a/Plugins/Mineplex.Core/src/mineplex/core/communities/commands/CommunityInviteCommand.java b/Plugins/Mineplex.Core/src/mineplex/core/communities/commands/CommunityInviteCommand.java index f3b6e6b65..004cd7dc7 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/communities/commands/CommunityInviteCommand.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/communities/commands/CommunityInviteCommand.java @@ -24,6 +24,12 @@ public class CommunityInviteCommand extends CommandBase @Override public void Execute(Player caller, String[] args) { + if (true) + { + caller.sendMessage(F.main("Communities", "Coming soon!")); + return; + } + if (args.length < 2) { UtilPlayer.message(caller, F.help("/com invite ", "Invites a player to a community you manage", Rank.ALL, ChatColor.AQUA)); diff --git a/Plugins/Mineplex.Core/src/mineplex/core/communities/commands/CommunityJoinCommand.java b/Plugins/Mineplex.Core/src/mineplex/core/communities/commands/CommunityJoinCommand.java index 202d73fc3..4802dfa6d 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/communities/commands/CommunityJoinCommand.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/communities/commands/CommunityJoinCommand.java @@ -21,6 +21,12 @@ public class CommunityJoinCommand extends CommandBase @Override public void Execute(Player caller, String[] args) { + if (true) + { + caller.sendMessage(F.main("Communities", "Coming soon!")); + return; + } + if (args.length < 1) { UtilPlayer.message(caller, F.help("/com join ", "Joins a community that is open or you have been invited to", Rank.ALL, ChatColor.AQUA)); diff --git a/Plugins/Mineplex.Core/src/mineplex/core/communities/commands/CommunityMCSCommand.java b/Plugins/Mineplex.Core/src/mineplex/core/communities/commands/CommunityMCSCommand.java index 1e499c57f..41d498a1b 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/communities/commands/CommunityMCSCommand.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/communities/commands/CommunityMCSCommand.java @@ -25,6 +25,12 @@ public class CommunityMCSCommand extends CommandBase @Override public void Execute(Player caller, String[] args) { + if (true) + { + caller.sendMessage(F.main("Communities", "Coming soon!")); + return; + } + if (args.length < 1) { UtilPlayer.message(caller, F.help("/com mcs ", "Opens the Mineplex Community Server of a community you manage", Rank.ALL, ChatColor.AQUA)); diff --git a/Plugins/Mineplex.Core/src/mineplex/core/communities/commands/CommunityRenameCommand.java b/Plugins/Mineplex.Core/src/mineplex/core/communities/commands/CommunityRenameCommand.java index bfa1863bf..b932b0a4e 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/communities/commands/CommunityRenameCommand.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/communities/commands/CommunityRenameCommand.java @@ -27,6 +27,12 @@ public class CommunityRenameCommand extends CommandBase @Override public void Execute(Player caller, String[] args) { + if (true) + { + caller.sendMessage(F.main("Communities", "Coming soon!")); + return; + } + if (args.length < 2) { UtilPlayer.message(caller, F.help("/com rename ", "Changes the name of a community you own", Rank.ETERNAL, ChatColor.AQUA)); diff --git a/Plugins/Mineplex.Core/src/mineplex/core/communities/commands/CommunityUnInviteCommand.java b/Plugins/Mineplex.Core/src/mineplex/core/communities/commands/CommunityUnInviteCommand.java index 99b5e9636..fc2035653 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/communities/commands/CommunityUnInviteCommand.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/communities/commands/CommunityUnInviteCommand.java @@ -24,6 +24,12 @@ public class CommunityUnInviteCommand extends CommandBase @Override public void Execute(Player caller, String[] args) { + if (true) + { + caller.sendMessage(F.main("Communities", "Coming soon!")); + return; + } + if (args.length < 2) { UtilPlayer.message(caller, F.help("/com uninvite ", "Revokes a player's invitation to a community you manage", Rank.ALL, ChatColor.AQUA)); 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 3fb75c743..c728fe4fa 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 @@ -409,7 +409,7 @@ public class ClansManager extends MiniClientPluginimplements IRelati _bannerManager.loadBanners(this); new PersonalServerManager(plugin, _clientManager).setUseInterfaceItem(false); - new CommunityManager(plugin, _clientManager); +// new CommunityManager(plugin, _clientManager); Bukkit.getMessenger().registerOutgoingPluginChannel(plugin, "Replay|Restrict"); diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/HubManager.java b/Plugins/Mineplex.Hub/src/mineplex/hub/HubManager.java index 5b65fd27a..fabd131ec 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/HubManager.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/HubManager.java @@ -275,7 +275,7 @@ public class HubManager extends MiniClientPlugin implements IChatMess new SalesAnnouncementManager(plugin); - new CommunityManager(plugin, _clientManager); +// new CommunityManager(plugin, _clientManager); ScoreboardManager scoreboardManager = new ScoreboardManager(plugin) { diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java index cbc0cd184..1f70552d3 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java @@ -407,7 +407,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation addCommand(new TauntCommand(this)); new PersonalServerManager(plugin, _clientManager).setUseInterfaceItem(false); - new CommunityManager(plugin, _clientManager); +// new CommunityManager(plugin, _clientManager); _scoreboardManager = new ScoreboardManager(_plugin) { From 253c907ba137a732f093e884e990e5f2db3a9569 Mon Sep 17 00:00:00 2001 From: Kenny Date: Thu, 22 Dec 2016 12:33:27 -0500 Subject: [PATCH 3/3] Update Anticheat dependency in core --- Plugins/Mineplex.Core/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugins/Mineplex.Core/pom.xml b/Plugins/Mineplex.Core/pom.xml index 65a90f2a7..06ecb566d 100644 --- a/Plugins/Mineplex.Core/pom.xml +++ b/Plugins/Mineplex.Core/pom.xml @@ -43,7 +43,7 @@ com.mineplex anticheat - 1.2 + 1.3 org.tukaani