mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-23 09:37:50 +01:00
Add ability to supress join/leave messages :: new permissions: essentials.silentjoin & essentials.silentquit
This commit is contained in:
parent
235f134514
commit
d5196e31b2
@ -164,6 +164,10 @@ public class EssentialsPlayerListener implements Listener
|
||||
{
|
||||
user.getBase().getOpenInventory().getTopInventory().clear();
|
||||
}
|
||||
if (user.hasPermission("essentials.silentquit"))
|
||||
{
|
||||
event.setQuitMessage(null);
|
||||
}
|
||||
user.updateActivity(false);
|
||||
user.dispose();
|
||||
}
|
||||
@ -171,6 +175,10 @@ public class EssentialsPlayerListener implements Listener
|
||||
@EventHandler(priority = EventPriority.MONITOR)
|
||||
public void onPlayerJoin(final PlayerJoinEvent event)
|
||||
{
|
||||
if (event.getPlayer().hasPermission("essentials.silentjoin"))
|
||||
{
|
||||
event.setJoinMessage(null);
|
||||
}
|
||||
ess.runTaskAsynchronously(new Runnable()
|
||||
{
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user