Java Code Examples for net.runelite.api.Player#getSkullIcon()
The following examples show how to use
net.runelite.api.Player#getSkullIcon() .
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: IdleNotifierPlugin.java From plugins with GNU General Public License v3.0 | 6 votes |
private void skullNotifier() { final Player local = client.getLocalPlayer(); SkullIcon currentTickSkull = local.getSkullIcon(); EnumSet worldTypes = client.getWorldType(); if (!(worldTypes.contains(WorldType.DEADMAN))) { if (!isFirstTick) { if (config.showSkullNotification() && lastTickSkull == null && currentTickSkull == SkullIcon.SKULL) { notifyWith(local, "is now skulled!"); } else if (config.showUnskullNotification() && lastTickSkull == SkullIcon.SKULL && currentTickSkull == null) { notifyWith(local, "is now unskulled!"); } } else { isFirstTick = false; } lastTickSkull = currentTickSkull; } }
Example 2
Source File: TimersPlugin.java From plugins with GNU General Public License v3.0 | 4 votes |
@Subscribe private void onGameTick(GameTick event) { loggedInRace = false; Player player = client.getLocalPlayer(); if (player == null) { return; } WorldPoint currentWorldPoint = player.getWorldLocation(); final boolean isSkulled = player.getSkullIcon() != null && player.getSkullIcon() != SkullIcon.SKULL_FIGHT_PIT; if (isSkulled != skulledLastTick && config.showSkull()) { skulledLastTick = isSkulled; if (isSkulled) { createGameTimer(SKULL); } else { removeGameTimer(SKULL); } } if (freezeTimer != null && // assume movement means unfrozen freezeTime != client.getTickCount() && !currentWorldPoint.equals(lastPoint)) { removeGameTimer(freezeTimer.getTimer()); freezeTimer = null; } lastPoint = currentWorldPoint; if (!widgetHiddenChangedOnPvpWorld) { return; } widgetHiddenChangedOnPvpWorld = false; Widget widget = client.getWidget(PVP_WORLD_SAFE_ZONE); if (widget != null && !widget.isSelfHidden()) { log.debug("Entered safe zone in PVP world, clearing Teleblock timer."); removeTbTimers(); } }