Handler created for StuckMsg
This commit is contained in:
@@ -14,9 +14,6 @@ import engine.Enum.ModType;
|
||||
import engine.Enum.SourceType;
|
||||
import engine.InterestManagement.InterestManager;
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.job.JobContainer;
|
||||
import engine.job.JobScheduler;
|
||||
import engine.jobs.StuckJob;
|
||||
import engine.math.Bounds;
|
||||
import engine.math.Vector3f;
|
||||
import engine.math.Vector3fImmutable;
|
||||
@@ -30,7 +27,6 @@ import engine.server.MBServerStatics;
|
||||
import org.pmw.tinylog.Logger;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import static engine.math.FastMath.sqr;
|
||||
|
||||
@@ -474,26 +470,4 @@ public enum MovementManager {
|
||||
ac.teleport(ac.getLoc());
|
||||
}
|
||||
|
||||
public static void stuck(ClientConnection origin) {
|
||||
|
||||
PlayerCharacter sourcePlayer = origin.getPlayerCharacter();
|
||||
|
||||
if (sourcePlayer == null)
|
||||
return;
|
||||
|
||||
if (sourcePlayer.getTimers().containsKey("Stuck"))
|
||||
return;
|
||||
|
||||
StuckJob sj = new StuckJob(sourcePlayer);
|
||||
JobContainer jc = JobScheduler.getInstance().scheduleJob(sj, 10000); // Convert
|
||||
ConcurrentHashMap<String, JobContainer> timers = sourcePlayer.getTimers();
|
||||
|
||||
if (timers != null) {
|
||||
if (timers.containsKey("Stuck")) {
|
||||
timers.get("Stuck").cancelJob();
|
||||
timers.remove("Stuck");
|
||||
}
|
||||
timers.put("Stuck", jc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user