RuneHive-Game
Loading...
Searching...
No Matches
com.runehive.game.world.World Class Reference

Represents the game world. More...

Collaboration diagram for com.runehive.game.world.World:

Public Member Functions

void dequeLogins ()
void dequeLogouts ()
Queue< PlayergetLogins ()
Queue< PlayergetLogouts ()
TaskManager getTaskManager ()
int getWildernessResourcePlayers ()
void process ()
void sequence ()
 Handles the world sequencing.

Static Public Member Functions

static void cancelTask (Object attachment)
static void cancelTask (Object attachment, boolean logout)
static int executeProjectile (Mob entity, ProjectileTest projectile)
static World get ()
static int getBotCount ()
static DataBus getDataBus ()
static Optional< NpcgetNpcBySlot (int index)
 Gets an npc by index.
static MobList< NpcgetNpcs ()
static Optional< PlayergetPlayerByHash (long usernameHash)
static Optional< PlayergetPlayerByName (String username)
static Optional< PlayergetPlayerBySlot (int index)
 Gets a player by index.
static int getPlayerCount ()
 Gets the amount of valid players online.
static MobList< PlayergetPlayers ()
static RegionManager getRegions ()
static List< PlayergetStaff ()
 Gets the staff players currently online.
static int getStaffCount ()
static int getWildernessCount ()
static void kickPlayer (Player other)
static void kickPlayer (Predicate< Player > condition)
static void queueLogin (Player player)
 Handles queueing the player logins.
static void queueLogout (Player player)
 Handles queueing the player logouts.
static void save ()
 Saves all the game data.
static void schedule (int delay, Runnable runnable)
 Executes a runnable on a delay.
static void schedule (Runnable runnable)
 Executes a runnable on a 1 tick delay.
static void schedule (Task task)
 Submits a new event.
static Optional< Playersearch (String name)
 Gets a player by name.
static Optional< PlayersearchAll (String name)
static void sendBroadcast (int time, String message, boolean countdown)
 Sends a game message.
static void sendGraphic (Graphic graphic, Position position)
static void sendGraphic (Graphic graphic, Position position, int instance)
 Sends a graphic to the world.
static void sendKillFeed (final Mob killer, final Mob victim)
 Sends a kill feed notification.
static void sendMessage (String message, Predicate< Player > filter)
 Sends a global message with an exception.
static void sendMessage (String... messages)
 Sends a global message.
static void sendObjectAnimation (int animation, GameObject object)
 Sends a world object animation.
static void sendProjectile (Mob source, Mob target, Projectile projectile)
 Sends a world projectile.
static void sendProjectile (Mob source, Position target, Projectile projectile)
 Sends a world projectile.
static void sendProjectile (Position source, Mob target, Projectile projectile)
static void sendProjectile (Position source, Position target, Projectile projectile)
static void sendProjectile (Projectile projectile, Position position, int instance, int lock, byte offsetX, byte offsetY)
 Sends a world projectile.
static void sendStaffMessage (String... messages)
static void shutdown ()
 Shuts down the server.
static void update (int time)
 Updates the server.

Static Public Attributes

static int addition = 0
static final AtomicBoolean update = new AtomicBoolean(false)

Private Member Functions

 World ()

Private Attributes

final Queue< Playerlogins = new ConcurrentLinkedQueue<>()
 The Players waiting to login.
final Queue< Playerlogouts = new ConcurrentLinkedQueue<>()
 The Players waiting to onLogout.
final MobList< Npcnpcs = new MobList<>(Config.MAX_NPCS)
 The npcs registered in this world.
final MobList< Playerplayers = new MobList<>(Config.MAX_PLAYERS)
 The players registered in this world.
final RegionManager regionManager = new RegionManager()
 The region manager.
final TaskDeadlockWatcher taskDeadlockWatcher
 The task deadlock watcher relies on the TaskManager.
final Thread taskDeadlockWatcherThread
 The thread to watch task deadlocks on.
final TaskManager taskManager
 The task manager.

Static Private Attributes

static final DataBus dataBus = DataBus.getInstance()
static final Logger logger = LogManager.getLogger(World.class)
static final World WORLD = new World()
 The world instance.

Detailed Description

Represents the game world.

Author
Daniel
Michael

Definition at line 46 of file World.java.

Constructor & Destructor Documentation

◆ World()

com.runehive.game.world.World.World ( )
private

Definition at line 82 of file World.java.

82 {
83 dataBus.subscribe(new WorldEventListener());
84 taskManager = new TaskManager();
85 taskDeadlockWatcher = new TaskDeadlockWatcher(taskManager);
87 taskDeadlockWatcherThread.setName("TaskDeadlockWatcher");
89 }
final TaskManager taskManager
The task manager.
Definition World.java:63
static final DataBus dataBus
Definition World.java:77
final Thread taskDeadlockWatcherThread
The thread to watch task deadlocks on.
Definition World.java:68
final TaskDeadlockWatcher taskDeadlockWatcher
The task deadlock watcher relies on the TaskManager.
Definition World.java:65

References dataBus, taskDeadlockWatcher, taskDeadlockWatcherThread, and taskManager.

Referenced by dequeLogouts(), get(), getNpcBySlot(), getPlayerByHash(), getPlayerByName(), getPlayerBySlot(), queueLogin(), and searchAll().

Here is the caller graph for this function:

Member Function Documentation

◆ cancelTask() [1/2]

void com.runehive.game.world.World.cancelTask ( Object attachment)
static

Definition at line 536 of file World.java.

536 {
537 cancelTask(attachment, false);
538 }
static void cancelTask(Object attachment)
Definition World.java:536

References cancelTask().

Referenced by cancelTask(), com.runehive.content.bot.PlayerBot.unregister(), and com.runehive.game.world.entity.mob.player.Player.unregister().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cancelTask() [2/2]

void com.runehive.game.world.World.cancelTask ( Object attachment,
boolean logout )
static

Definition at line 540 of file World.java.

540 {
541 get().taskManager.cancel(attachment, logout);
542 }

References taskManager.

◆ dequeLogins()

void com.runehive.game.world.World.dequeLogins ( )

Definition at line 427 of file World.java.

427 {
428 if (logins.isEmpty()) {
429 return;
430 }
431
432 for (int index = 0; index < Config.LOGIN_THESHOLD; index++) {
433 Player player = logins.poll();
434
435 if (player == null) {
436 break;
437 }
438
439 try {
440 player.register();
441 } catch (Exception ex) {
442 logger.error(String.format("error registering %s", player), ex);
443 }
444
445 }
446 }
static final Logger logger
Definition World.java:48
final Queue< Player > logins
The Players waiting to login.
Definition World.java:57
void register()
Registers an entity to the World.
Definition Player.java:577
val index

References logger, com.runehive.Config.LOGIN_THESHOLD, logins, and com.runehive.game.world.entity.mob.player.Player.register().

Here is the call graph for this function:

◆ dequeLogouts()

void com.runehive.game.world.World.dequeLogouts ( )

Definition at line 448 of file World.java.

448 {
449 if (logouts.isEmpty()) {
450 return;
451 }
452
453 for (int index = 0; index < Config.LOGOUT_THESHOLD; index++) {
454 Player player = logouts.poll();
455
456 if (player == null) {
457 break;
458 }
459
460 World.schedule(new PlayerRemovalTask(player, false));
461 }
462 }
final Queue< Player > logouts
The Players waiting to onLogout.
Definition World.java:60

References com.runehive.Config.LOGOUT_THESHOLD, logouts, and World().

Here is the call graph for this function:

◆ executeProjectile()

int com.runehive.game.world.World.executeProjectile ( Mob entity,
ProjectileTest projectile )
static

Definition at line 366 of file World.java.

366 {
367 if (projectile == null) {
368 return 0;
369 }
370 Position source = projectile.getStart();
371 Position target = projectile.getTarget();
372 if (source == null || target == null) {
373 return 0;
374 }
375 Position delta = projectile.getTarget().getDelta(source, target);
376
377 int distance = entity.getPosition().getChevDistance(target);
378
379 if (distance <= 60) {
380 int creatorSize = projectile.getCreatorSize() == -1 ? 1 : projectile.getCreatorSize(); //TODO size
381
382 for (Player player : getPlayers()) {
383 if (player == null) {
384 continue;
385 }
386
387 if (source.isViewableFrom(player.getPosition())) {
388 player.send(new SendProjectileTestPacket(source, delta, projectile.getSlope(), projectile.getSpeed(), projectile.getProjectileId(), projectile.getStartHeight(), projectile.getEndHeight(), projectile.getLockon(), projectile.getDelay(), creatorSize, projectile.getStartDistanceOffset()));
389 }
390 }
391 }
392 return projectile.getHitDelay(distance);
393 }
static MobList< Player > getPlayers()
Definition World.java:544
boolean isViewableFrom(Position other)

References com.runehive.game.ProjectileTest.getCreatorSize(), com.runehive.game.ProjectileTest.getDelay(), com.runehive.game.world.position.Position.getDelta(), com.runehive.game.ProjectileTest.getEndHeight(), com.runehive.game.ProjectileTest.getHitDelay(), com.runehive.game.ProjectileTest.getLockon(), getPlayers(), com.runehive.game.ProjectileTest.getProjectileId(), com.runehive.game.ProjectileTest.getSlope(), com.runehive.game.ProjectileTest.getSpeed(), com.runehive.game.ProjectileTest.getStart(), com.runehive.game.ProjectileTest.getStartDistanceOffset(), com.runehive.game.ProjectileTest.getStartHeight(), com.runehive.game.ProjectileTest.getTarget(), and com.runehive.game.world.position.Position.isViewableFrom().

Here is the call graph for this function:

◆ get()

World com.runehive.game.world.World.get ( )
static

Definition at line 532 of file World.java.

532 {
533 return WORLD;
534 }
static final World WORLD
The world instance.
Definition World.java:80

References WORLD, and World().

Referenced by com.runehive.game.engine.GameEngine.runOneIteration().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getBotCount()

int com.runehive.game.world.World.getBotCount ( )
static

Definition at line 494 of file World.java.

494 {
495 return PlayerBot.BOT_COUNT.get();
496 }

References com.runehive.content.bot.PlayerBot.BOT_COUNT.

◆ getDataBus()

DataBus com.runehive.game.world.World.getDataBus ( )
static

◆ getLogins()

Queue< Player > com.runehive.game.world.World.getLogins ( )

Definition at line 560 of file World.java.

560 {
561 return logins;
562 }

References logins.

◆ getLogouts()

Queue< Player > com.runehive.game.world.World.getLogouts ( )

Definition at line 564 of file World.java.

564 {
565 return logouts;
566 }

References logouts.

◆ getNpcBySlot()

Optional< Npc > com.runehive.game.world.World.getNpcBySlot ( int index)
static

Gets an npc by index.

Definition at line 209 of file World.java.

209 {
210 for (Npc npc : World.getNpcs()) {
211 if (npc.getIndex() == index)
212 return Optional.of(npc);
213 }
214 return Optional.empty();
215 }

References World().

Here is the call graph for this function:

◆ getNpcs()

MobList< Npc > com.runehive.game.world.World.getNpcs ( )
static

Definition at line 548 of file World.java.

548 {
549 return get().npcs;
550 }
final MobList< Npc > npcs
The npcs registered in this world.
Definition World.java:54

References npcs.

Referenced by com.runehive.game.task.impl.ForceChatEvent.execute(), com.runehive.content.ai.AIDialogueHandler.findNearbyNpc(), com.runehive.content.combat.cannon.CannonManager.getNpc(), com.runehive.game.world.entity.mob.npc.Npc.register(), com.runehive.game.engine.GameEngine.runOneIteration(), and com.runehive.game.world.entity.mob.npc.Npc.unregister().

Here is the caller graph for this function:

◆ getPlayerByHash()

Optional< Player > com.runehive.game.world.World.getPlayerByHash ( long usernameHash)
static

Definition at line 183 of file World.java.

183 {
184 for (Player player : World.getPlayers()) {
185 if (Objects.equals(player.usernameLong, usernameHash))
186 return Optional.of(player);
187 }
188 return Optional.empty();
189 }

References World().

Referenced by com.runehive.net.session.LoginSession.evaluate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPlayerByName()

Optional< Player > com.runehive.game.world.World.getPlayerByName ( String username)
static

Definition at line 191 of file World.java.

191 {
192 for (Player player : World.getPlayers()) {
193 if (Objects.equals(player.getUsername(), username))
194 return Optional.of(player);
195 }
196 return Optional.empty();
197 }

References World().

Referenced by com.runehive.content.ai.LazyAIManager.clearPlayerConsent().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPlayerBySlot()

Optional< Player > com.runehive.game.world.World.getPlayerBySlot ( int index)
static

Gets a player by index.

Definition at line 200 of file World.java.

200 {
201 for (Player player : World.getPlayers()) {
202 if (player.getIndex() == index)
203 return Optional.of(player);
204 }
205 return Optional.empty();
206 }

References World().

Here is the call graph for this function:

◆ getPlayerCount()

int com.runehive.game.world.World.getPlayerCount ( )
static

Gets the amount of valid players online.

Definition at line 490 of file World.java.

490 {
491 return Math.toIntExact(getPlayers().size() + addition);
492 }

References addition, and getPlayers().

Referenced by com.runehive.net.packet.out.SendMarquee.encode(), com.runehive.net.session.LoginSession.evaluate(), com.runehive.game.service.WebsitePlayerCountService.runOneIteration(), and com.runehive.game.world.entity.mob.player.Player.sendInitialPackets().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPlayers()

◆ getRegions()

◆ getStaff()

List< Player > com.runehive.game.world.World.getStaff ( )
static

Gets the staff players currently online.

Definition at line 521 of file World.java.

521 {
522 List<Player> staff = new ArrayList<>();
523
524 for (Player player : getPlayers()) {
525 if (player != null && (PlayerRight.isModerator(player) || player.right == PlayerRight.HELPER))
526 staff.add(player);
527 }
528
529 return staff;
530 }

References getPlayers(), com.runehive.game.world.entity.mob.player.PlayerRight.HELPER, and com.runehive.game.world.entity.mob.player.PlayerRight.isModerator().

Referenced by sendStaffMessage().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getStaffCount()

int com.runehive.game.world.World.getStaffCount ( )
static

Definition at line 498 of file World.java.

498 {
499 int count = 0;
500
501 for (Player player : getPlayers()) {
502 if (player != null && (PlayerRight.isModerator(player) || player.right == PlayerRight.HELPER))
503 count++;
504 }
505
506 return count;
507 }

References getPlayers(), com.runehive.game.world.entity.mob.player.PlayerRight.HELPER, and com.runehive.game.world.entity.mob.player.PlayerRight.isModerator().

Here is the call graph for this function:

◆ getTaskManager()

TaskManager com.runehive.game.world.World.getTaskManager ( )

Definition at line 556 of file World.java.

556 {
557 return taskManager;
558 }

References taskManager.

◆ getWildernessCount()

int com.runehive.game.world.World.getWildernessCount ( )
static

Definition at line 509 of file World.java.

509 {
510 int count = 0;
511
512 for (Player player : getPlayers()) {
513 if (player != null && !player.isBot && Area.inWilderness(player))
514 count++;
515 }
516
517 return count;
518 }

References getPlayers(), and com.runehive.game.world.position.Area.inWilderness().

Here is the call graph for this function:

◆ getWildernessResourcePlayers()

int com.runehive.game.world.World.getWildernessResourcePlayers ( )

Definition at line 464 of file World.java.

464 {
465 int count = 0;
466 for (Player player : getPlayers()) {
467 if (player != null && Area.inWildernessResource(player))
468 count++;
469 }
470 return count;
471 }

References getPlayers(), and com.runehive.game.world.position.Area.inWildernessResource().

Here is the call graph for this function:

◆ kickPlayer() [1/2]

void com.runehive.game.world.World.kickPlayer ( Player other)
static

Definition at line 217 of file World.java.

217 {
218 other.send(new SendLogout());
219 queueLogout(other);
220 }
static void queueLogout(Player player)
Handles queueing the player logouts.
Definition World.java:138

References queueLogout(), and com.runehive.game.world.entity.mob.player.Player.send().

Here is the call graph for this function:

◆ kickPlayer() [2/2]

void com.runehive.game.world.World.kickPlayer ( Predicate< Player > condition)
static

Definition at line 222 of file World.java.

222 {
223 for (Player player : get().players) {
224 if (player.isBot)
225 continue;
226 if (!condition.test(player))
227 continue;
228 player.send(new SendLogout());
229 queueLogout(player);
230 }
231 }

References players, and queueLogout().

Here is the call graph for this function:

◆ process()

void com.runehive.game.world.World.process ( )

Definition at line 233 of file World.java.

233 {
234 try {
235 taskManager.processTasks();
236 } catch (Exception ex) {
237 logger.error("Error sequencing task manager", ex);
238 }
239 try {
240 PestControlLobby.sequence();
241 } catch (Exception ex) {
242 logger.error("Error sequencing pest control.", ex);
243 }
244 }

References logger, com.runehive.content.activity.impl.pestcontrol.PestControlLobby.sequence(), and taskManager.

Here is the call graph for this function:

◆ queueLogin()

void com.runehive.game.world.World.queueLogin ( Player player)
static

Handles queueing the player logins.

Definition at line 129 of file World.java.

129 {
130 if (player.isBot) {
131 get().logins.add(player);
132 } else {
133 player.getSession().ifPresent(it -> World.get().logins.add(player));
134 }
135 }

References com.runehive.game.world.entity.mob.player.Player.getSession(), com.runehive.game.world.entity.mob.player.Player.isBot, logins, and World().

Referenced by com.runehive.net.session.LoginSession.handleUserLoginDetails().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ queueLogout()

void com.runehive.game.world.World.queueLogout ( Player player)
static

Handles queueing the player logouts.

Definition at line 138 of file World.java.

138 {
139 if (player == null || get().logouts.contains(player)) {
140 return;
141 }
142
143 get().logouts.add(player);
144 }

References logouts.

Referenced by kickPlayer(), kickPlayer(), com.runehive.game.world.entity.mob.player.Player.logout(), and com.runehive.net.session.GameSession.onClose().

Here is the caller graph for this function:

◆ save()

void com.runehive.game.world.World.save ( )
static

Saves all the game data.

Definition at line 97 of file World.java.

97 {
98 System.out.println("Saving osroyale...");
99 get().players.forEach(PlayerSerializer::save);
100 logger.info("All players were successfully saved.");
101 /* GlobalRecords.save();
102 logger.info("All global records were successfully saved.");*/
103 ClanRepository.saveAllActiveClans();
104 logger.info("All clans were successfully saved.");
105 TradingPost.saveRecentHistory();
106 TradingPost.saveAllItemHistory();
107 logger.info("All trading post history was successfully saved");
108 GameSaver.save();
109 logger.info("All game data were successfully saved.");
110 }

References logger, players, com.runehive.game.world.entity.mob.player.persist.PlayerSerializer.save(), com.runehive.util.GameSaver.save(), com.runehive.content.clanchannel.ClanRepository.saveAllActiveClans(), com.runehive.content.tradingpost.TradingPost.saveAllItemHistory(), and com.runehive.content.tradingpost.TradingPost.saveRecentHistory().

Referenced by com.runehive.RuneHive.main(), and com.runehive.game.task.impl.SystemUpdateEvent.tick().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ schedule() [1/3]

void com.runehive.game.world.World.schedule ( int delay,
Runnable runnable )
static

Executes a runnable on a delay.

Definition at line 252 of file World.java.

252 {
253 schedule(new Task(delay) {
254 @Override
255 public void execute() {
256 runnable.run();
257 cancel();
258 }
259 });
260 }
static void schedule(Task task)
Submits a new event.
Definition World.java:247

References schedule().

Here is the call graph for this function:

◆ schedule() [2/3]

void com.runehive.game.world.World.schedule ( Runnable runnable)
static

Executes a runnable on a 1 tick delay.

Definition at line 263 of file World.java.

263 {
264 schedule(1, runnable);
265 }

References schedule().

Here is the call graph for this function:

◆ schedule() [3/3]

void com.runehive.game.world.World.schedule ( Task task)
static

Submits a new event.

Definition at line 247 of file World.java.

247 {
248 get().taskManager.schedule(task);
249 }

References taskManager.

Referenced by com.runehive.content.Obelisks.activate(), com.runehive.content.WellOfGoodwill.activate(), com.runehive.game.world.items.ground.GroundItem.addToRegion(), com.runehive.game.world.entity.mob.npc.Npc.appendDeath(), com.runehive.game.world.entity.mob.player.Player.appendDeath(), com.runehive.game.world.entity.mob.Mob.attack(), com.runehive.content.wintertodt.Wintertodt.attackPyromancers(), com.runehive.game.world.entity.combat.strategy.npc.boss.magearena.Justiciar.block(), com.runehive.game.world.entity.combat.strategy.npc.boss.magearena.Porazdir.block(), com.runehive.game.world.entity.combat.strategy.npc.boss.Wyrm.block(), com.runehive.content.wintertodt.Wintertodt.breakBrazier(), com.runehive.content.skill.impl.woodcutting.WoodcuttingAction.chop(), com.runehive.content.activity.impl.kraken.KrakenActivity.cleanup(), com.runehive.content.activity.impl.VorkathActivity.clickNpc(), com.runehive.content.skill.impl.hunter.Hunter.clickNpc(), com.runehive.content.skill.impl.thieving.Thieving.clickNpc(), com.runehive.content.activity.impl.warriorguild.WarriorGuild.clickObject(), com.runehive.content.skill.impl.mining.Mining.clickObject(), com.runehive.content.skill.impl.runecrafting.Runecraft.clickObject(), com.runehive.content.skill.impl.thieving.Thieving.clickObject(), com.runehive.content.skill.impl.construction.House.construct(), com.runehive.content.skill.impl.farming.patches.DiseasablePatch.curePlant(), com.runehive.game.world.entity.mob.npc.NpcDeath.death(), com.runehive.content.wintertodt.Wintertodt.doMagicAttack(), com.runehive.game.world.entity.combat.strategy.npc.boss.Vorkath.VenomSpecial.dragonFireTickableTask(), com.runehive.content.combat.cannon.CannonManager.drop(), com.runehive.content.skill.impl.construction.House.enter(), com.runehive.content.skill.impl.construction.House.enter(), com.runehive.content.skill.impl.agility.obstacle.ObstacleInteraction.execute(), com.runehive.content.skill.impl.hunter.net.Netting.execute(), com.runehive.game.action.ActionManager.execute(), com.runehive.game.world.cronjobs.Job.execute(), com.runehive.game.world.entity.combat.strategy.npc.boss.skotizo.SkotizoEvent.execute(), com.runehive.game.world.entity.mob.movement.waypoint.Waypoint.findRoute(), com.runehive.content.activity.impl.kraken.KrakenActivity.finish(), com.runehive.game.world.entity.mob.Mob.follow(), com.runehive.game.world.entity.mob.Mob.forceMove(), com.runehive.content.gambling.impl.FiftyFive.gamble(), com.runehive.content.gambling.impl.FlowerPoker.gamble(), com.runehive.content.activity.impl.barrows.BarrowsUtility.generateRewards(), com.runehive.content.activity.infernomobs.MejRah.Ranged.hit(), com.runehive.game.world.entity.combat.strategy.npc.boss.MutantTarn.FrozenSpecial.hit(), com.runehive.game.world.entity.combat.strategy.npc.boss.Venenatis.PrayerDrain.hit(), com.runehive.game.world.entity.combat.strategy.npc.boss.Vorkath.FrozenSpecial.hit(), com.runehive.game.world.entity.combat.Combat< T extends Mob >.hitTask(), com.runehive.content.shootingstar.ShootingStar.init(), com.runehive.content.wintertodt.Wintertodt.init(), com.runehive.content.skill.impl.farming.patches.FarmingPatch.inspect(), com.runehive.game.task.impl.HunterTask.intialize(), com.runehive.content.combat.cannon.CannonManager.load(), com.runehive.content.activity.impl.magearena.MageArena.meteors(), com.runehive.content.skill.impl.mining.MiningAction.mine(), com.runehive.game.world.entity.mob.player.PlayerAssistant.moveCamera(), com.runehive.content.consume.PotionData.onAntiPoisonEffect(), com.runehive.content.activity.Activity.onDeath(), com.runehive.content.activity.impl.barrows.Barrows.onDeath(), com.runehive.content.activity.impl.CerberusActivity.onDeath(), com.runehive.content.activity.impl.fightcaves.FightCaves.onDeath(), com.runehive.content.activity.impl.kraken.KrakenActivity.onDeath(), com.runehive.content.activity.impl.magearena.MageArena.onDeath(), com.runehive.content.activity.impl.pestcontrol.PestControlGame.onDeath(), com.runehive.content.activity.impl.recipefordisaster.RecipeForDisaster.onDeath(), com.runehive.content.activity.impl.VorkathActivity.onDeath(), com.runehive.content.activity.impl.warriorguild.WarriorGuild.onDeath(), com.runehive.content.activity.impl.zulrah.ZulrahActivity.onDeath(), com.runehive.content.pet.Pets.onDeath(), com.runehive.content.skill.impl.firemaking.FiremakingAction.onDestruct(), com.runehive.content.skill.impl.agility.obstacle.impl.ArdougneJumpGapInteraction.onExecution(), com.runehive.content.skill.impl.agility.obstacle.impl.ArdougneRoofJumpInteraction.onExecution(), com.runehive.content.skill.impl.agility.obstacle.impl.ArdougneRoofJumpInteraction2.onExecution(), com.runehive.content.skill.impl.agility.obstacle.impl.ArdougneWallClimbInteraction.onExecution(), com.runehive.content.skill.impl.agility.obstacle.impl.ClimbInteraction.onExecution(), com.runehive.content.skill.impl.agility.obstacle.impl.SeersClimbInteraction.onExecution(), com.runehive.content.skill.impl.agility.obstacle.impl.SeersJumpGapInteraction.onExecution(), com.runehive.content.skill.impl.agility.obstacle.impl.SeersJumpGapInteraction2.onExecution(), com.runehive.content.skill.impl.agility.obstacle.impl.SteppingStonesInteraction.onExecution(), com.runehive.content.skill.impl.agility.obstacle.impl.SwingAcrossCableInteraction.onExecution(), com.runehive.content.skill.impl.agility.obstacle.impl.WildernessDoorInteraction.onExecution(), com.runehive.content.pet.Pets.onLogin(), com.runehive.RuneHive.onStart(), com.runehive.game.world.entity.mob.player.Player.onStep(), com.runehive.game.world.entity.mob.player.Player.pickup(), com.runehive.content.gambling.impl.FlowerPoker.plant(), com.runehive.content.skill.impl.farming.patches.impl.FlowerPatch.plantScareCrow(), com.runehive.content.skill.impl.farming.patches.FarmingPatch.plantSeed(), com.runehive.game.world.entity.combat.strategy.npc.boss.Hydra.poisonAttack(), com.runehive.game.world.entity.mob.player.PlayerDeath.postDeath(), com.runehive.game.world.entity.combat.strategy.npc.boss.StoneGuardian.preDeath(), com.runehive.game.world.entity.combat.strategy.npc.boss.Vetion.preDeath(), com.runehive.content.ai.AIDialogueHandler.processGandalfAIMessage(), com.runehive.content.store.impl.DefaultStore.refresh(), com.runehive.game.world.entity.mob.player.exchange.ExchangeSession.remove(), com.runehive.content.activity.Activity.restart(), schedule(), schedule(), com.runehive.content.tradingpost.TradingPost.searchExistingItemInput(), com.runehive.content.tradingpost.TradingPost.searchPlayerInput(), com.runehive.content.dialogue.impl.VoteDialogue.sendDialogues(), com.runehive.game.world.entity.mob.player.PlayerAssistant.setEffects(), com.runehive.game.world.entity.mob.npc.NpcAssistant.setEvent(), com.runehive.game.world.entity.mob.Mob.setWaypoint(), com.runehive.content.combat.Skulling.skull(), com.runehive.content.activity.inferno.InfernoBoss.spawnbosswave(), com.runehive.game.world.entity.combat.strategy.npc.boss.Cerberus.GhostAttack.special(), com.runehive.content.mysterybox.MysteryBoxManager.spin(), com.runehive.content.activity.infernomobs.Jalimkot.Burrow.start(), com.runehive.content.activity.infernomobs.JalTokJad.RangedAttack.start(), com.runehive.content.skill.impl.mining.Mining.start(), com.runehive.game.world.entity.combat.effect.CombatEffect.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.Callisto.Roar.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.Cerberus.GhostAttack.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.Cerberus.LavaAttack.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.ChaosFanatic.RainAttack.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.CrazyArchaeologist.RainAttack.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.LizardShaman.JumpAttack.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.LizardShaman.MinionsAttack.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.magearena.Derwen.LightingRain.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.magearena.Justiciar.LightingRain.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.skotizo.Skotizo.LightingRain.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.skotizo.Skotizo.Magic.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.StoneGuardian.BarrageAttack.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.StoneGuardian.BoomAttack.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.StoneGuardian.PrayerAttack.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.StoneGuardian.Transform.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.Vetion.Magic.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.Vorkath.VenomSpecial.start(), com.runehive.content.ai.LazyAIManager.startInactivityTimer(), com.runehive.content.ai.AIDialogueHandler.streamGandalfResponse(), com.runehive.content.activity.impl.warriorguild.WarriorGuild.summon(), com.runehive.game.world.entity.mob.player.Player.teleblock(), com.runehive.game.world.entity.combat.Combat< T extends Mob >.tick(), com.runehive.content.activity.panel.ActivityPanel.timedClear(), update(), com.runehive.game.world.entity.mob.Mob.walkTo(), com.runehive.content.skill.impl.farming.patches.WaterablePatch.waterPatch(), com.runehive.game.world.entity.mob.player.BannedPlayers.writeBans(), com.runehive.game.world.entity.mob.player.IPBannedPlayers.writeIpBans(), and com.runehive.game.world.entity.mob.player.IPMutedPlayers.writeIpMutes().

Here is the caller graph for this function:

◆ search()

Optional< Player > com.runehive.game.world.World.search ( String name)
static

Gets a player by name.

Definition at line 147 of file World.java.

147 {
148 for (Player player : get().players) {
149 if (player == null) {
150 continue;
151 }
152
153 if (player.getUsername().equalsIgnoreCase(name)) {
154 return Optional.of(player);
155 }
156 }
157 return Optional.empty();
158 }

References players.

Referenced by com.runehive.game.world.entity.mob.player.relations.PlayerRelation.addFriend(), com.runehive.game.world.entity.mob.player.relations.PlayerRelation.addIgnore(), com.runehive.content.tradingpost.TradingPost.alertSeller(), com.runehive.game.world.entity.mob.player.relations.PlayerRelation.deleteIgnore(), com.runehive.content.skill.impl.construction.House.enter(), com.runehive.net.session.LoginSession.evaluate(), and com.runehive.content.store.impl.PersonalStore.onPurchase().

Here is the caller graph for this function:

◆ searchAll()

Optional< Player > com.runehive.game.world.World.searchAll ( String name)
static

Definition at line 160 of file World.java.

160 {
161 for (Player player : get().players) {
162 if (player == null) {
163 continue;
164 }
165
166 if (player.getUsername().equalsIgnoreCase(name)) {
167 return Optional.of(player);
168 }
169 }
170
171 for (Player player : World.get().getLogins()) {
172 if (player == null) {
173 continue;
174 }
175
176 if (player.getUsername().equalsIgnoreCase(name)) {
177 return Optional.of(player);
178 }
179 }
180 return Optional.empty();
181 }

References players, and World().

Referenced by com.runehive.net.session.LoginSession.evaluate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sendBroadcast()

void com.runehive.game.world.World.sendBroadcast ( int time,
String message,
boolean countdown )
static

Sends a game message.

Definition at line 420 of file World.java.

420 {
421 get().players.stream().forEach($it -> {
422 $it.send(new SendGameMessage(countdown ? 0 : 1, time, Utility.capitalizeSentence(message)));
423 $it.send(new SendMessage("<col=2C7526>Broadcast: </col>" + Utility.capitalizeSentence(message)));
424 });
425 }

References com.runehive.util.Utility.capitalizeSentence(), and players.

Referenced by com.runehive.content.famehall.FameHandler.activate(), com.runehive.game.world.entity.combat.strategy.npc.boss.magearena.DerwenUtility.generatederwenSpawn(), com.runehive.game.world.entity.combat.strategy.npc.boss.magearena.PorazdirUtility.generatePorazdirSpawn(), and com.runehive.game.world.entity.combat.strategy.npc.boss.magearena.JusticarUtility.generateSpawn().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sendGraphic() [1/2]

void com.runehive.game.world.World.sendGraphic ( Graphic graphic,
Position position )
static

Definition at line 277 of file World.java.

277 {
278 get().players.stream().filter(player -> Utility.withinDistance(player, position, Region.VIEW_DISTANCE))
279 .forEach(player -> {
280 player.send(new SendGraphic(graphic, position));
281 });
282 }

References players, com.runehive.game.world.region.Region.VIEW_DISTANCE, and com.runehive.util.Utility.withinDistance().

Here is the call graph for this function:

◆ sendGraphic() [2/2]

void com.runehive.game.world.World.sendGraphic ( Graphic graphic,
Position position,
int instance )
static

Sends a graphic to the world.

Definition at line 268 of file World.java.

268 {
269 for (Player player : getPlayers()) {
270 if (player.instance != instance)
271 continue;
272 if (!Utility.withinDistance(player, position, Region.VIEW_DISTANCE))
273 continue;
274 player.send(new SendGraphic(graphic, position));
275 }
276 }

References getPlayers(), com.runehive.game.world.region.Region.VIEW_DISTANCE, and com.runehive.util.Utility.withinDistance().

Referenced by com.runehive.game.world.entity.combat.strategy.npc.boss.magearena.Justiciar.block(), com.runehive.game.world.entity.combat.strategy.npc.boss.magearena.Porazdir.block(), com.runehive.game.world.entity.combat.strategy.npc.boss.Vorkath.VenomSpecial.dragonFireTickableTask(), com.runehive.game.world.entity.combat.strategy.npc.boss.TzTokJad.RangedAttack.hit(), com.runehive.game.world.entity.combat.strategy.npc.boss.Vorkath.FireballAttack.hit(), com.runehive.game.world.entity.combat.strategy.npc.boss.Vorkath.FrozenSpecial.hit(), com.runehive.game.world.entity.combat.strategy.npc.boss.Cerberus.LavaAttack.lavaTask(), com.runehive.content.activity.impl.magearena.MageArena.meteors(), com.runehive.game.world.entity.combat.strategy.npc.boss.Hydra.poisonTask(), com.runehive.content.skill.impl.prayer.BoneSacrifice.sacrifice(), com.runehive.content.activity.impl.magearena.MageArena.start(), com.runehive.content.activity.infernomobs.JalTokJad.RangedAttack.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.ChaosFanatic.RainAttack.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.CrazyArchaeologist.RainAttack.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.LizardShaman.MinionsAttack.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.skotizo.Skotizo.LightingRain.start(), and com.runehive.game.world.entity.combat.strategy.npc.boss.Vetion.Magic.start().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sendKillFeed()

void com.runehive.game.world.World.sendKillFeed ( final Mob killer,
final Mob victim )
static

Sends a kill feed notification.

Definition at line 474 of file World.java.

474 {
475 if (victim.isNpc()) {
476 if (Area.inWilderness(victim)) {
477 return;
478 }
479 if (!victim.getNpc().npcAssistant.isBoss()) {
480 return;
481 }
482 }
483
484 for (final Player player : getPlayers()) {
485 player.send(new SendKillFeed(killer, victim));
486 }
487 }

References com.runehive.game.world.entity.mob.Mob.getNpc(), getPlayers(), com.runehive.game.world.position.Area.inWilderness(), com.runehive.game.world.entity.mob.npc.NpcAssistant.isBoss(), com.runehive.game.world.entity.mob.Mob.isNpc(), and com.runehive.game.world.entity.mob.npc.Npc.npcAssistant.

Referenced by com.runehive.game.world.entity.mob.MobDeath< T extends Mob >.execute().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sendMessage() [1/2]

void com.runehive.game.world.World.sendMessage ( String message,
Predicate< Player > filter )
static

Sends a global message with an exception.

Definition at line 405 of file World.java.

405 {
406 if (com.runehive.Config.DISABLE_BROADCASTS) return;
407 for (Player player : getPlayers()) {
408 if (player != null && filter.test(player))
409 player.message(message);
410 }
411 }

References getPlayers().

Here is the call graph for this function:

◆ sendMessage() [2/2]

void com.runehive.game.world.World.sendMessage ( String... messages)
static

Sends a global message.

Definition at line 396 of file World.java.

396 {
397 if (com.runehive.Config.DISABLE_BROADCASTS) return;
398 for (Player player : getPlayers()) {
399 if (player != null)
400 player.message(messages);
401 }
402 }

References getPlayers().

Referenced by com.runehive.content.WellOfGoodwill.activate(), com.runehive.content.combat.Killstreak.announce(), com.runehive.content.RoyaltyProgram.append(), com.runehive.game.service.VoteService.claimReward(), com.runehive.content.WellOfGoodwill.contribute(), com.runehive.game.world.entity.combat.strategy.npc.boss.magearena.DerwenUtility.defeated(), com.runehive.game.world.entity.combat.strategy.npc.boss.magearena.JusticarUtility.defeated(), com.runehive.game.world.entity.combat.strategy.npc.boss.magearena.PorazdirUtility.defeated(), com.runehive.game.world.entity.mob.npc.drop.NpcDropManager.drop(), com.runehive.content.combat.Killstreak.end(), com.runehive.content.bloodmoney.BloodChestEvent.execute(), com.runehive.game.task.impl.DoubleExperienceEvent.execute(), com.runehive.game.task.impl.MessageEvent.execute(), com.runehive.game.world.cronjobs.impl.DoubleExperienceJob.execute(), com.runehive.game.world.entity.combat.strategy.npc.boss.skotizo.SkotizoEvent.execute(), com.runehive.content.bloodmoney.BloodMoneyChest.finish(), com.runehive.game.world.entity.combat.strategy.npc.boss.magearena.DerwenUtility.generatederwenSpawn(), com.runehive.game.world.entity.combat.strategy.npc.boss.magearena.PorazdirUtility.generatePorazdirSpawn(), com.runehive.game.world.entity.combat.strategy.npc.boss.magearena.JusticarUtility.generateSpawn(), com.runehive.game.world.entity.combat.strategy.npc.boss.skotizo.SkotizoUtility.generateSpawn(), com.runehive.game.world.entity.mob.npc.drop.NpcDropManager.handleMessages(), com.runehive.content.shootingstar.ShootingStar.init(), com.runehive.game.task.impl.DoubleExperienceEvent.onCancel(), com.runehive.content.pet.Pets.onSpawn(), com.runehive.game.world.entity.mob.player.PlayerDeath.postDeath(), com.runehive.content.prestige.Prestige.prestige(), com.runehive.content.donators.Donation.redeem(), com.runehive.content.mysterybox.MysteryBoxEvent.reward(), com.runehive.game.world.entity.mob.player.Player.sendInitialPackets(), com.runehive.content.bloodmoney.BloodMoneyChest.spawn(), com.runehive.game.world.entity.mob.player.Player.unregister(), com.runehive.game.world.entity.skill.SkillManager.updateSkill(), and com.runehive.content.Yell.yell().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sendObjectAnimation()

void com.runehive.game.world.World.sendObjectAnimation ( int animation,
GameObject object )
static

Sends a world object animation.

Definition at line 284 of file World.java.

284 {
285 for (Player player : getPlayers()) {
286 if (player.instance != object.getInstancedHeight())
287 continue;
288 if (!Utility.withinDistance(player, object.getPosition(), Region.VIEW_DISTANCE))
289 continue;
290 player.send(new SendObjectAnimation(animation, object));
291 }
292 }

References getPlayers(), com.runehive.game.world.region.Region.VIEW_DISTANCE, and com.runehive.util.Utility.withinDistance().

Referenced by com.runehive.content.lms.LMSGame.rollChest(), and com.runehive.content.combat.cannon.CannonManager.rotate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sendProjectile() [1/5]

void com.runehive.game.world.World.sendProjectile ( Mob source,
Mob target,
Projectile projectile )
static

Sends a world projectile.

Definition at line 307 of file World.java.

307 {
308 int lockon = target.isNpc() ? target.getIndex() + 1 : -target.getIndex() - 1;
309 int sourceX = source.getX() + source.width() / 2, sourceY = source.getY() + source.length() / 2;
310 int targetX = target.getX() + target.width() / 2, targetY = target.getY() + target.length() / 2;
311 byte offsetX = (byte) (targetX - sourceX);
312 byte offsetY = (byte) (targetY - sourceY);
313 Position center = new Position(sourceX, sourceY);
314
315 for (Player player : getPlayers()) {
316 if (source.instance != player.instance)
317 continue;
318 if (!Utility.withinDistance(target, player, Region.VIEW_DISTANCE))
319 continue;
320 player.send(new SendProjectile(projectile, center, lockon, offsetX, offsetY));
321 }
322 }
final boolean isNpc()
Check if an entity is an npc.
Definition Mob.java:550

References com.runehive.game.world.entity.Entity.getIndex(), getPlayers(), com.runehive.game.world.entity.Entity.getX(), com.runehive.game.world.entity.Entity.getY(), com.runehive.game.world.entity.Entity.instance, com.runehive.game.world.entity.mob.Mob.isNpc(), com.runehive.game.world.entity.Entity.length, com.runehive.game.world.region.Region.VIEW_DISTANCE, com.runehive.game.world.entity.Entity.width, and com.runehive.util.Utility.withinDistance().

Here is the call graph for this function:

◆ sendProjectile() [2/5]

void com.runehive.game.world.World.sendProjectile ( Mob source,
Position target,
Projectile projectile )
static

Sends a world projectile.

Definition at line 340 of file World.java.

340 {
341 int sourceX = source.getX() + source.width() / 2, sourceY = source.getY() + source.length() / 2;
342 Position center = new Position(sourceX, sourceY);
343 byte offsetX = (byte) (target.getX() - sourceX);
344 byte offsetY = (byte) (target.getY() - sourceY);
345 for (Player player : getPlayers()) {
346 if (source.instance != player.instance)
347 continue;
348 if (!Utility.withinDistance(player, target, Region.VIEW_DISTANCE))
349 continue;
350 player.send(new SendProjectile(projectile, center, -1, offsetX, offsetY));
351 }
352 }
int getY()
Gets the absolute y coordinate.
Definition Position.java:46
int getX()
Gets the absolute x coordinate.
Definition Position.java:41

References getPlayers(), com.runehive.game.world.entity.Entity.getX(), com.runehive.game.world.position.Position.getX(), com.runehive.game.world.entity.Entity.getY(), com.runehive.game.world.position.Position.getY(), com.runehive.game.world.entity.Entity.instance, com.runehive.game.world.entity.Entity.length, com.runehive.game.world.region.Region.VIEW_DISTANCE, com.runehive.game.world.entity.Entity.width, and com.runehive.util.Utility.withinDistance().

Here is the call graph for this function:

◆ sendProjectile() [3/5]

void com.runehive.game.world.World.sendProjectile ( Position source,
Mob target,
Projectile projectile )
static

Definition at line 324 of file World.java.

324 {
325 int lockon = target.isNpc() ? target.getIndex() + 1 : -target.getIndex() - 1;
326 int sourceX = source.getX(), sourceY = source.getY();
327 int targetX = target.getX() + target.width() / 2, targetY = target.getY() + target.length() / 2;
328 byte offsetX = (byte) (targetX - sourceX);
329 byte offsetY = (byte) (targetY - sourceY);
330 Position center = new Position(sourceX, sourceY);
331
332 for (Player player : getPlayers()) {
333 if (!Utility.withinDistance(target, player, Region.VIEW_DISTANCE))
334 continue;
335 player.send(new SendProjectile(projectile, center, lockon, offsetX, offsetY));
336 }
337 }

References com.runehive.game.world.entity.Entity.getIndex(), getPlayers(), com.runehive.game.world.entity.Entity.getX(), com.runehive.game.world.position.Position.getX(), com.runehive.game.world.entity.Entity.getY(), com.runehive.game.world.position.Position.getY(), com.runehive.game.world.entity.mob.Mob.isNpc(), com.runehive.game.world.entity.Entity.length, com.runehive.game.world.region.Region.VIEW_DISTANCE, com.runehive.game.world.entity.Entity.width, and com.runehive.util.Utility.withinDistance().

Here is the call graph for this function:

◆ sendProjectile() [4/5]

void com.runehive.game.world.World.sendProjectile ( Position source,
Position target,
Projectile projectile )
static

Definition at line 354 of file World.java.

354 {
355 int sourceX = source.getX(), sourceY = source.getY();
356 Position center = new Position(sourceX, sourceY);
357 byte offsetX = (byte) (target.getX() - sourceX);
358 byte offsetY = (byte) (target.getY() - sourceY);
359 for (Player player : getPlayers()) {
360 if (!Utility.withinDistance(player, target, Region.VIEW_DISTANCE))
361 continue;
362 player.send(new SendProjectile(projectile, center, -1, offsetX, offsetY));
363 }
364 }

References getPlayers(), com.runehive.game.world.position.Position.getX(), com.runehive.game.world.position.Position.getY(), com.runehive.game.world.region.Region.VIEW_DISTANCE, and com.runehive.util.Utility.withinDistance().

Here is the call graph for this function:

◆ sendProjectile() [5/5]

void com.runehive.game.world.World.sendProjectile ( Projectile projectile,
Position position,
int instance,
int lock,
byte offsetX,
byte offsetY )
static

Sends a world projectile.

Definition at line 295 of file World.java.

295 {
296 for (Player player : getPlayers()) {
297 if (player.instance != instance)
298 continue;
299 if (!Utility.withinDistance(player, position, Region.VIEW_DISTANCE))
300 continue;
301 player.send(new SendProjectile(projectile, position, lock, offsetX, offsetY));
302
303 }
304 }

References getPlayers(), com.runehive.game.world.region.Region.VIEW_DISTANCE, and com.runehive.util.Utility.withinDistance().

Referenced by com.runehive.content.combat.cannon.CannonFireAction.execute(), com.runehive.game.world.entity.combat.attack.listener.npc.dragon.BrutalDragon.MagicAttack.getAttackAnimation(), com.runehive.game.world.entity.combat.strategy.npc.boss.TzTokJad.MagicAttack.hit(), com.runehive.game.world.entity.combat.strategy.npc.boss.Hydra.poisonAttack(), com.runehive.game.Projectile.send(), com.runehive.game.Projectile.send(), com.runehive.game.world.entity.combat.projectile.CombatProjectile.sendProjectile(), com.runehive.game.world.entity.combat.strategy.npc.boss.Callisto.Roar.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.ChaosFanatic.RainAttack.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.CrazyArchaeologist.RainAttack.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.magearena.Derwen.LightingRain.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.magearena.Justiciar.LightingRain.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.skotizo.Skotizo.LightingRain.start(), and com.runehive.game.world.entity.combat.strategy.npc.boss.Vetion.Magic.start().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sendStaffMessage()

void com.runehive.game.world.World.sendStaffMessage ( String... messages)
static

Definition at line 413 of file World.java.

413 {
414 for (Player player : getStaff()) {
415 player.message(messages);
416 }
417 }
static List< Player > getStaff()
Gets the staff players currently online.
Definition World.java:521

References getStaff().

Here is the call graph for this function:

◆ sequence()

void com.runehive.game.world.World.sequence ( )

Handles the world sequencing.

Definition at line 92 of file World.java.

92 {
93
94 }

◆ shutdown()

void com.runehive.game.world.World.shutdown ( )
static

Shuts down the server.

Definition at line 122 of file World.java.

122 {
123 System.out.println("shutting down...");
124 get().taskDeadlockWatcher.requestExit();
125 System.exit(0);
126 }

References taskDeadlockWatcher.

Referenced by com.runehive.game.task.impl.SystemUpdateEvent.onCancel().

Here is the caller graph for this function:

◆ update()

void com.runehive.game.world.World.update ( int time)
static

Updates the server.

Definition at line 113 of file World.java.

113 {
114 if (!update.get()) {
115 update.set(true);
116 schedule(new SystemUpdateEvent(time));
117 get().players.stream().forEach(it -> it.send(new SendGameMessage(0, time / 100, "System update" + " in:")));
118 }
119 }
static final AtomicBoolean update
Definition World.java:72

References players, schedule(), and update.

Here is the call graph for this function:

Member Data Documentation

◆ addition

int com.runehive.game.world.World.addition = 0
static

Definition at line 74 of file World.java.

Referenced by getPlayerCount().

◆ dataBus

final DataBus com.runehive.game.world.World.dataBus = DataBus.getInstance()
staticprivate

Definition at line 77 of file World.java.

Referenced by getDataBus(), and World().

◆ logger

final Logger com.runehive.game.world.World.logger = LogManager.getLogger(World.class)
staticprivate

Definition at line 48 of file World.java.

Referenced by dequeLogins(), process(), and save().

◆ logins

final Queue<Player> com.runehive.game.world.World.logins = new ConcurrentLinkedQueue<>()
private

The Players waiting to login.

Definition at line 57 of file World.java.

Referenced by dequeLogins(), getLogins(), and queueLogin().

◆ logouts

final Queue<Player> com.runehive.game.world.World.logouts = new ConcurrentLinkedQueue<>()
private

The Players waiting to onLogout.

Definition at line 60 of file World.java.

Referenced by dequeLogouts(), getLogouts(), and queueLogout().

◆ npcs

final MobList<Npc> com.runehive.game.world.World.npcs = new MobList<>(Config.MAX_NPCS)
private

The npcs registered in this world.

Definition at line 54 of file World.java.

Referenced by getNpcs().

◆ players

final MobList<Player> com.runehive.game.world.World.players = new MobList<>(Config.MAX_PLAYERS)
private

The players registered in this world.

Definition at line 51 of file World.java.

Referenced by getPlayers(), kickPlayer(), save(), search(), searchAll(), sendBroadcast(), sendGraphic(), and update().

◆ regionManager

final RegionManager com.runehive.game.world.World.regionManager = new RegionManager()
private

The region manager.

Definition at line 70 of file World.java.

Referenced by getRegions().

◆ taskDeadlockWatcher

final TaskDeadlockWatcher com.runehive.game.world.World.taskDeadlockWatcher
private

The task deadlock watcher relies on the TaskManager.

Definition at line 65 of file World.java.

Referenced by shutdown(), and World().

◆ taskDeadlockWatcherThread

final Thread com.runehive.game.world.World.taskDeadlockWatcherThread
private

The thread to watch task deadlocks on.

Definition at line 68 of file World.java.

Referenced by World().

◆ taskManager

final TaskManager com.runehive.game.world.World.taskManager
private

The task manager.

Definition at line 63 of file World.java.

Referenced by cancelTask(), getTaskManager(), process(), schedule(), and World().

◆ update

final AtomicBoolean com.runehive.game.world.World.update = new AtomicBoolean(false)
static

◆ WORLD

final World com.runehive.game.world.World.WORLD = new World()
staticprivate

The world instance.

Definition at line 80 of file World.java.

Referenced by get().


The documentation for this class was generated from the following file: