From 2efe4225191df572422c8996da67f09c670e1c5c Mon Sep 17 00:00:00 2001 From: AlexTheCoder Date: Sat, 23 Sep 2017 04:10:33 -0400 Subject: [PATCH] Fixed merge conflicts --- .../clans/moderation/antialt/AltManager.java | 8 ++- .../mineplex/clanshub/ClansHubFunManager.java | 70 ------------------- 2 files changed, 7 insertions(+), 71 deletions(-) delete mode 100644 Plugins/Mineplex.Hub.Clans/src/mineplex/clanshub/ClansHubFunManager.java diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/moderation/antialt/AltManager.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/moderation/antialt/AltManager.java index 2c2f1305a..4547d15c5 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/moderation/antialt/AltManager.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/moderation/antialt/AltManager.java @@ -427,7 +427,13 @@ public class AltManager extends MiniPlugin _repo.loadAccountIds(ipAddress, _serverId, accounts -> { accounts.remove(Integer.valueOf(accountId)); - callback.accept(!accounts.isEmpty()); + ChainedDatabaseAction action = _repo.checkAltAccount(ipAddress, _serverId, accountId).chain(_repo.checkIpWhitelisted(ipAddress)).chain(_repo.login(ipAddress, accountId, _serverId)); + action.executeAsync(() -> + { + boolean isAlt = action.getResult(AltRepository.ALT_STATUS_KEY); + boolean isWhitelisted = action.getResult(AltRepository.WHITELIST_STATUS_KEY); + callback.accept(isAlt && !isWhitelisted); + }); }); } diff --git a/Plugins/Mineplex.Hub.Clans/src/mineplex/clanshub/ClansHubFunManager.java b/Plugins/Mineplex.Hub.Clans/src/mineplex/clanshub/ClansHubFunManager.java deleted file mode 100644 index 2934d487e..000000000 --- a/Plugins/Mineplex.Hub.Clans/src/mineplex/clanshub/ClansHubFunManager.java +++ /dev/null @@ -1,70 +0,0 @@ -package mineplex.clanshub; - -import org.bukkit.Bukkit; -import org.bukkit.entity.Entity; -import org.bukkit.event.EventHandler; - -import mineplex.core.Managers; -import mineplex.core.MiniPlugin; -import mineplex.core.ReflectivelyCreateMiniPlugin; -import mineplex.core.common.skin.SkinData; -import mineplex.core.common.util.C; -import mineplex.core.common.util.UtilPlayer; -import mineplex.core.disguise.DisguiseManager; -import mineplex.core.disguise.disguises.DisguisePlayer; -import mineplex.core.npc.NpcManager; -import mineplex.core.recharge.Recharge; -import mineplex.core.updater.UpdateType; -import mineplex.core.updater.event.UpdateEvent; - -@ReflectivelyCreateMiniPlugin -public class ClansHubFunManager extends MiniPlugin -{ - private Entity _melon; - private Entity _meep; - - private final NpcManager _npc; - private final DisguiseManager _disguise; - - private ClansHubFunManager() - { - super("Clans Hub Fun"); - - _npc = Managers.get(NpcManager.class); - _disguise = Managers.get(DisguiseManager.class); - } - - @EventHandler - public void onUpdate(UpdateEvent event) - { - if (event.getType() == UpdateType.TWOSEC) - { - if (_melon == null || _melon.isDead() || !_melon.isValid()) - { - _melon = _npc.getNpcByName("Melonboy").getEntity(); - if (_melon != null && !_melon.isDead() && _melon.isValid()) - { - DisguisePlayer disguise = new DisguisePlayer(_melon, "Melonboy", SkinData.MELON_PERSON); - _disguise.disguise(disguise); - } - } - if (_meep == null || _meep.isDead() || !_meep.isValid()) - { - _meep = _npc.getNpcByName("Meepman").getEntity(); - if (_meep != null && !_meep.isDead() && _meep.isValid()) - { - DisguisePlayer disguise = new DisguisePlayer(_melon, "Meepman", SkinData.MELON_PERSON); - _disguise.disguise(disguise); - } - } - - Bukkit.getOnlinePlayers().forEach(player -> - { - if (Recharge.Instance.use(player, "Clans Fun Notify", 15000, false, false)) - { - UtilPlayer.message(player, C.cGold + ""); - } - }); - } - } -} \ No newline at end of file