cb fixed
This commit is contained in:
parent
a175ead44a
commit
b4d340a655
|
@ -134,7 +134,7 @@ public class Clans extends JavaPlugin
|
|||
new FriendManager(this, _clientManager, preferenceManager, portal);
|
||||
new InventoryManager(this, _clientManager);
|
||||
ResourcePackManager resourcePackManager = new ResourcePackManager(this, portal);
|
||||
resourcePackManager.setResourcePack("http://garblox.com/b:ResClans.zip", "http://garblox.com/b:ResClans19.zip", true);
|
||||
resourcePackManager.setResourcePack("http://garblox.com/files/b/ResClans.zip", "http://garblox.com/files/b/ResClans19.zip", true);
|
||||
|
||||
// Enable custom-gear related managers
|
||||
new CustomTagFix(this, packetHandler);
|
||||
|
|
|
@ -26,6 +26,7 @@ import mineplex.core.account.ILoginProcessor;
|
|||
import mineplex.core.common.Pair;
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.Callback;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.common.util.UtilTime.TimeUnit;
|
||||
import mineplex.core.donation.DonationManager;
|
||||
|
@ -71,6 +72,20 @@ public class ClansBanManager extends MiniPlugin implements ILoginProcessor
|
|||
@EventHandler
|
||||
public void clearOldClients(UpdateEvent event)
|
||||
{
|
||||
if (event.getType().equals(UpdateType.SEC))
|
||||
{
|
||||
_toKick.forEach((name, reason) -> {
|
||||
Player player = UtilPlayer.searchExact(name);
|
||||
|
||||
if (player == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
player.kickPlayer(reason);
|
||||
});
|
||||
}
|
||||
|
||||
if (!event.getType().equals(UpdateType.MIN_01))
|
||||
{
|
||||
return;
|
||||
|
@ -103,26 +118,6 @@ public class ClansBanManager extends MiniPlugin implements ILoginProcessor
|
|||
return _repository;
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onPlayerJoin(AsyncPlayerPreLoginEvent event)
|
||||
{
|
||||
LoadClient(event.getName(), client -> {
|
||||
if (client.isBanned())
|
||||
{
|
||||
String time = UtilTime.convertString(client.getLongestBan().getTimeLeft(), 0, TimeUnit.FIT);
|
||||
|
||||
if (client.getLongestBan().isPermanent())
|
||||
time = "Permanent";
|
||||
|
||||
String reason = C.cRedB + "You are banned from Clans for " + time +
|
||||
"\n" + C.cWhite + client.getLongestBan().getReason();
|
||||
|
||||
event.disallow(Result.KICK_BANNED, reason);
|
||||
event.setKickMessage(reason);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.LOWEST)
|
||||
public void onPlayerQuit(PlayerQuitEvent event)
|
||||
{
|
||||
|
@ -236,7 +231,7 @@ public class ClansBanManager extends MiniPlugin implements ILoginProcessor
|
|||
|
||||
LoadClient(name, callback);
|
||||
}
|
||||
|
||||
|
||||
public void processLoginResultSet(String playerName, int accountId, ResultSet resultSet) throws SQLException
|
||||
{
|
||||
_repository.loadBans(playerName, client -> {
|
||||
|
|
|
@ -747,6 +747,9 @@ public class ItemMapManager extends MiniPlugin
|
|||
{
|
||||
Collections.sort(_scanList, _comparator);
|
||||
}
|
||||
|
||||
if (_scanList.isEmpty())
|
||||
return;
|
||||
|
||||
Entry<Integer, Integer> entry = _scanList.remove(0);
|
||||
|
||||
|
|
Loading…
Reference in New Issue