mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-12-28 12:47:36 +00:00
supervanish is gone
This commit is contained in:
parent
63570d61d6
commit
b0daf2066a
@ -1,64 +0,0 @@
|
||||
package me.totalfreedom.totalfreedommod.bridge;
|
||||
|
||||
import de.myzelyam.api.vanish.PlayerHideEvent;
|
||||
import de.myzelyam.api.vanish.PlayerShowEvent;
|
||||
import me.totalfreedom.totalfreedommod.FreedomService;
|
||||
import me.totalfreedom.totalfreedommod.player.PlayerData;
|
||||
import me.totalfreedom.totalfreedommod.rank.Displayable;
|
||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
|
||||
public class VanishBridge extends FreedomService
|
||||
{
|
||||
@Override
|
||||
public void onStart()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStop()
|
||||
{
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onPlayerUnvanish(PlayerShowEvent event)
|
||||
{
|
||||
Player player = event.getPlayer();
|
||||
Displayable display = plugin.rm.getDisplay(player);
|
||||
String tag = display.getColoredTag();
|
||||
|
||||
if (event.isSilent())
|
||||
{
|
||||
plugin.sl.messageAllStaff(ChatColor.GOLD + player.getName() + " silently unvanished.");
|
||||
}
|
||||
else
|
||||
{
|
||||
plugin.sl.messageAllStaff(ChatColor.GOLD + player.getName() + " unvanished and is now visible to all players.");
|
||||
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)
|
||||
{
|
||||
tag = FUtil.colorize(playerData.getTag());
|
||||
}
|
||||
playerData.setTag(tag);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onPlayerVanish(PlayerHideEvent event)
|
||||
{
|
||||
Player player = event.getPlayer();
|
||||
if (event.isSilent())
|
||||
{
|
||||
plugin.sl.messageAllStaff(ChatColor.GOLD + player.getName() + " vanished and is now only visible to staff.");
|
||||
}
|
||||
else
|
||||
{
|
||||
plugin.dc.messageChatChannel("**" + player.getName() + " left the server" + "**");
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user