#Why after the update this don't work??

1 messages · Page 1 of 1 (latest)

dire harness
#

the error is cannot read property subscribe of undifined at anonymus

plush widget
#

see events doc

dire harness
# plush widget see events doc

i found this change ChatSendAfter & ChatSendBeforeEvent
Changed message and sender to read-only properties
Removed setTargets, getTargets, sendToTargetsand replaced with an optional player list property targets

plush widget
#

seems fine

#

show exaxt error

dire harness
#

the index is this

#

import { world } from '@minecraft/server'

import './cmd.js'
import './main.js'
import './chatspam.js'

plush widget
#

whats at line 5 in cmd.ja

dire harness
#

Minecraft.world.beforeEvents.chatSend.subscribe((data) => {

plush widget
#

show top code also

dire harness
#

import * as Minecraft from "@minecraft/server";

let prefix = "-";

Minecraft.world.beforeEvents.chatSend.subscribe((data) => {
if (data.message.toLowerCase().startsWith(${prefix}help)) {
data.cancel = true;
data.sender.runCommandAsync(function ZANGhelp);
}
});

plush widget
#

weird

dire harness
#

Do you have any packs for chat commands so I can try to compare them?

plush widget
#

whats ur manifest

dire harness
#

{
"format_version": 2,
"header": {
"description": "§l§2Angu§friac§4raft§3 security V3",
"name": "§l§2Angu§friac§4raft§3 security §6function e chatrank",
"uuid": "e66fcd27-4479-9d5f-a3f7-ee581e9c9d81",
"version": [
1,
1,
7
],
"min_engine_version": [
1,
19,
40
]
},
"modules": [
{
"description": "Example behavior pack module",
"type": "script",
"language": "javascript",
"uuid": "6c90f42f-5d7c-43c5-be22-248bafb097c0",
"version": [
0,
0,
1
],
"entry": "scripts/index.js"
}
],
"dependencies": [
{
"module_name": "@minecraft/server",
"version": "1.8.0"
},
{
"module_name": "@keen arrow",
"version": "1.2.0-beta"
}
]
}

#

i only changed 1.8.0-beta to 1.8.0

plush widget
#

game version ?

dire harness
#

1.20.60

plush widget
#

yea seems like a game bug

#

same issue

#

@dire harness do

for (let i in world.beforeEvents) {
console.warn(i)
}

simple field
#

maybe it's still in beta?

plush widget
#

no they have classes in docs but not in events

#

somethin has issues

simple field
dire harness
#

i chaged the manifest into 1.9.0-beta and now it works

plush widget
#

ye