MCPcopy Create free account
hub / github.com/MaxBittker/rs-sdk / processQueue

Method processQueue

server/engine/src/engine/entity/Player.ts:895–918  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

893 if (type === PlayerQueueType.ENGINE) {
894 request.delay = 0;
895 this.engineQueue.addTail(request);
896 } else if (type === PlayerQueueType.WEAK) {
897 this.weakQueue.addTail(request);
898 } else {
899 this.queue.addTail(request);
900 }
901 }
902
903 unlinkQueuedScript(scriptId: number, type: QueueType = PlayerQueueType.NORMAL) {
904 if (type === PlayerQueueType.ENGINE) {
905 for (const request of this.engineQueue.all()) {
906 if (request.script.id === scriptId) {
907 request.unlink();
908 }
909 }
910 } else {
911 for (const request of this.queue.all()) {
912 if (request.script.id === scriptId) {
913 request.unlink();
914 }
915 }
916 for (const request of this.weakQueue.all()) {
917 if (request.script.id === scriptId) {
918 request.unlink();
919 }
920 }
921 }

Callers 1

processQueuesMethod · 0.95

Calls 5

canAccessMethod · 0.95
executeScriptMethod · 0.95
allMethod · 0.45
unlinkMethod · 0.45
initMethod · 0.45

Tested by

no test coverage detected