@zardoy/flying-squid 0.0.109 → 0.0.111

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -39,6 +39,7 @@ declare global {
39
39
  };
40
40
  'suspiciousDigStopped': {
41
41
  _input: {
42
+ stop: boolean;
42
43
  expectedDiggingTime: number;
43
44
  actualDiggingTime: number;
44
45
  tooFast: boolean;
@@ -164,15 +164,20 @@ const player = function (player, serv, { version }) {
164
164
  const DIG_TIME_ALLOWED_THRESHOLD = 50;
165
165
  const tooFast = digTimeDiff > DIG_TIME_ALLOWED_THRESHOLD;
166
166
  const tooFar = player.position.distanceTo(location) > MAX_DIG_DISTANCE;
167
- if (tooFast || tooFar) {
167
+ if (tooFar) {
168
168
  stop = true;
169
169
  await player.behavior('suspiciousDigStopped', {
170
170
  tooFast,
171
171
  digTimeDiff,
172
172
  tooFar,
173
173
  location,
174
- digTimeAllowedThreshold: DIG_TIME_ALLOWED_THRESHOLD
175
- }, () => { }, () => {
174
+ digTimeAllowedThreshold: DIG_TIME_ALLOWED_THRESHOLD,
175
+ actualDiggingTime: diggingTime,
176
+ expectedDiggingTime,
177
+ stop
178
+ }, (data) => {
179
+ stop = data.stop;
180
+ }, () => {
176
181
  stop = false;
177
182
  });
178
183
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zardoy/flying-squid",
3
3
  "description": "A minecraft server written in TS",
4
- "version": "0.0.109",
4
+ "version": "0.0.111",
5
5
  "main": "dist/index.js",
6
6
  "types": "./dist/index.d.ts",
7
7
  "bin": "dist/app.js",