@boem312/minecraft-server
Version:
A pure JS library to create Minecraft Java 1.16.3 servers
21 lines (19 loc) • 445 B
JavaScript
module.exports = {
sneaking: {
info: {
preventSet: true
},
get() {
return this.p._sneaking;
},
set(newValue) {
const oldValue = this.sneaking;
this.p._sneaking = newValue;
if (oldValue !== newValue)
this.p.emitChange('sneaking', oldValue);
},
init() {
this.p._sneaking = false;
}
}
}