Java Code Examples for com.earth2me.essentials.User#isHidden()
The following examples show how to use
com.earth2me.essentials.User#isHidden() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: EssentialsHook.java From SuperVanish with Mozilla Public License 2.0 | 6 votes |
@Override public void run() { try { if (!Bukkit.getPluginManager().isPluginEnabled("Essentials")) return; for (UUID uuid : superVanish.getVanishStateMgr().getOnlineVanishedPlayers()) { Player p = Bukkit.getPlayer(uuid); User user = essentials.getUser(p); if (user == null) continue; if (!user.isHidden()) user.setHidden(true); } } catch (Exception e) { cancel(); superVanish.logException(e); } }
Example 2
Source File: EssentialsHook.java From SuperVanish with Mozilla Public License 2.0 | 5 votes |
@EventHandler(priority = EventPriority.LOW) public void onJoin(PlayerJoinEvent e) { User user = essentials.getUser(e.getPlayer()); if (user == null) return; if (superVanish.getVanishStateMgr().isVanished(e.getPlayer().getUniqueId()) && !user.isHidden()) user.setHidden(true); else user.setHidden(false); }