mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-09-15 16:38:57 +02:00
[Bleeding] Prepare something for handling reload better, later.
This commit is contained in:
parent
ee3e3bb431
commit
fbc85de617
@ -557,10 +557,34 @@ public class NoCheatPlus extends JavaPlugin implements NoCheatPlusAPI {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Care for already online players.
|
||||||
|
final Player[] onlinePlayers = getServer().getOnlinePlayers();
|
||||||
|
// TODO: remap exemptionmanager !
|
||||||
|
// TODO: Disable all checks for these players for one tick !
|
||||||
|
// TODO: Prepare check data for players [problem: permissions]?
|
||||||
|
Bukkit.getScheduler().scheduleSyncDelayedTask(this, new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
postEnable(onlinePlayers);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// Tell the server administrator that we finished loading NoCheatPlus now.
|
// Tell the server administrator that we finished loading NoCheatPlus now.
|
||||||
LogUtil.logInfo("[NoCheatPlus] Version " + getDescription().getVersion() + " is enabled.");
|
LogUtil.logInfo("[NoCheatPlus] Version " + getDescription().getVersion() + " is enabled.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Actions to be done after enable of all plugins. This aims at reloading mainly.
|
||||||
|
*/
|
||||||
|
private void postEnable(final Player[] onlinePlayers){
|
||||||
|
for (final Player player : onlinePlayers){
|
||||||
|
updatePermStateReceivers(player);
|
||||||
|
}
|
||||||
|
// TODO: if (online.lenght > 0) LogUtils.logInfo("[NCP] Updated " + online.length + "players (post-enable).")
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// public void onPlayerJoinLow(final PlayerJoinEvent event) {
|
// public void onPlayerJoinLow(final PlayerJoinEvent event) {
|
||||||
// /*
|
// /*
|
||||||
// * ____ _ _ _
|
// * ____ _ _ _
|
||||||
|
Loading…
Reference in New Issue
Block a user