Fix restore of tablist hider

This commit is contained in:
games647
2016-04-05 21:19:25 +02:00
parent 9ea75c502c
commit 48c5dd03bd
5 changed files with 68 additions and 6 deletions
@@ -162,6 +162,10 @@ public class ProcessSyncPlayerLogin implements Runnable {
restoreInventory();
}
if (settings.getProperty(RestrictionSettings.HIDE_TABLIST_BEFORE_LOGIN) && plugin.tablistHider != null) {
plugin.tablistHider.sendTablist(player);
}
// Cleanup no longer used temporary data
LimboCache.getInstance().deleteLimboPlayer(name);
if (playerCache.doesCacheExist(player)) {
@@ -208,7 +212,7 @@ public class ProcessSyncPlayerLogin implements Runnable {
// Login is now finished; we can force all commands
forceCommands();
sendTo();
}
@@ -54,7 +54,7 @@ public class ProcessSyncPasswordRegister implements Process {
}
for (String command : Settings.forceRegisterCommandsAsConsole) {
Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(),
command.replace("%p", player.getName()));
command.replace("%p", player.getName()));
}
}
@@ -80,6 +80,10 @@ public class ProcessSyncPasswordRegister implements Process {
public void run() {
LimboPlayer limbo = LimboCache.getInstance().getLimboPlayer(name);
if (limbo != null) {
if (Settings.hideTablistBeforeLogin && plugin.tablistHider != null) {
plugin.tablistHider.sendTablist(player);
}
Utils.teleportToSpawn(player);
if (Settings.protectInventoryBeforeLogInEnabled && plugin.inventoryProtector != null) {