mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2026-08-01 14:39:13 -06:00
Fall back if in void for some unknown reason. credits to PlayerName
This commit is contained in:
parent
32995db64c
commit
a47f77edf7
1 changed files with 8 additions and 1 deletions
|
|
@ -2,6 +2,7 @@ package core.game.activity;
|
|||
|
||||
import content.global.skill.construction.HouseZone;
|
||||
import core.ServerConstants;
|
||||
import core.api.ContentAPIKt;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.tools.Log;
|
||||
import core.tools.SystemLogger;
|
||||
|
|
@ -84,7 +85,13 @@ public final class ActivityManager {
|
|||
|
||||
public static void ActivityRecover(Player player) {
|
||||
String activityName = player.getAttribute("lastActivity", null);
|
||||
if (activityName == null) return;
|
||||
if (activityName == null) {
|
||||
if (player.getLocation().getY() < 2000) { //credits to PlayerName
|
||||
sendMessage(player, "You were stuck inside an instance, which should never happen. Please file a bug report, and include the following information: $loc. To prevent your client from crashing, you have been teleported back home. We apologise for the inconvenience.");
|
||||
player.setLocation(ServerConstants.HOME_LOCATION);
|
||||
}
|
||||
return;
|
||||
}
|
||||
//sendMessage(player,player.getUsername() + " recovering from " + activityName);
|
||||
if (activityName.equals("POH-Activity")) {
|
||||
HouseZone.remove_items(player);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue