Fixed merge conflicts

This commit is contained in:
AlexTheCoder 2017-09-23 04:10:33 -04:00
parent 73fac33554
commit 2efe422519
2 changed files with 7 additions and 71 deletions

View File

@ -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);
});
});
}

View File

@ -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 + "");
}
});
}
}
}