mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-30 02:05:41 +00:00
silent joining and leaving fixes
This commit is contained in:
parent
4555a7e3f2
commit
5c50f8f27d
@ -8,10 +8,10 @@ import me.totalfreedom.totalfreedommod.rank.Displayable;
|
||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
|
||||
public class VanishBridge extends FreedomService
|
||||
{
|
||||
|
||||
@Override
|
||||
public void onStart()
|
||||
{
|
||||
@ -22,15 +22,19 @@ public class VanishBridge extends FreedomService
|
||||
{
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
@EventHandler
|
||||
public void onPlayerUnvanish(PlayerShowEvent event)
|
||||
{
|
||||
Player player = event.getPlayer();
|
||||
Displayable display = plugin.rm.getDisplay(player);
|
||||
String tag = display.getColoredTag();
|
||||
|
||||
if (!event.isSilent())
|
||||
{
|
||||
FUtil.bcastMsg(plugin.rm.craftLoginMessage(event.getPlayer(), null));
|
||||
plugin.dc.messageChatChannel("**" + player.getName() + " joined the server" + "**");
|
||||
}
|
||||
|
||||
PlayerData playerData = plugin.pl.getData(player);
|
||||
if (playerData.getTag() != null)
|
||||
{
|
||||
@ -39,10 +43,13 @@ public class VanishBridge extends FreedomService
|
||||
playerData.setTag(tag);
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
@EventHandler
|
||||
public void onPlayerVanish(PlayerHideEvent event)
|
||||
{
|
||||
Player player = event.getPlayer();
|
||||
if (!event.isSilent())
|
||||
{
|
||||
plugin.dc.messageChatChannel("**" + player.getName() + " left the server" + "**");
|
||||
}
|
||||
}
|
||||
}
|
@ -44,8 +44,6 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.entity.PlayerDeathEvent;
|
||||
import org.bukkit.event.player.PlayerJoinEvent;
|
||||
import org.bukkit.event.player.PlayerQuitEvent;
|
||||
|
||||
public class Discord extends FreedomService
|
||||
{
|
||||
@ -251,24 +249,6 @@ public class Discord extends FreedomService
|
||||
return VERIFICATION_CODES;
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.MONITOR)
|
||||
public void onPlayerJoin(PlayerJoinEvent event)
|
||||
{
|
||||
if (!plugin.al.isVanished(event.getPlayer()))
|
||||
{
|
||||
messageChatChannel("**" + deformat(event.getPlayer().getName()) + " joined the server" + "**");
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.MONITOR)
|
||||
public void onPlayerLeave(PlayerQuitEvent event)
|
||||
{
|
||||
if (!plugin.al.isVanished(event.getPlayer()))
|
||||
{
|
||||
messageChatChannel("**" + deformat(event.getPlayer().getName()) + " left the server" + "**");
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.MONITOR)
|
||||
public void onPlayerDeath(PlayerDeathEvent event)
|
||||
{
|
||||
|
@ -5,7 +5,6 @@ import me.totalfreedom.totalfreedommod.admin.Admin;
|
||||
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
|
||||
import me.totalfreedom.totalfreedommod.player.FPlayer;
|
||||
import me.totalfreedom.totalfreedommod.player.PlayerData;
|
||||
import me.totalfreedom.totalfreedommod.util.FLog;
|
||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.bukkit.ChatColor;
|
||||
|
@ -41,7 +41,7 @@ operators:
|
||||
- "libsdisguises.noactionbar"
|
||||
|
||||
# WorldGuard
|
||||
- "worldgyardregion.list.own"
|
||||
- "worldguardregion.list.own"
|
||||
- "worldguard.region.addmember.own.*"
|
||||
- "worldguard.region.removemember.own.*"
|
||||
- "worldguard.region.info.*"
|
||||
|
Loading…
Reference in New Issue
Block a user