mirror of
https://github.com/danbulant/flying-squid
synced 2026-07-06 11:40:46 +00:00
add try catch for the modpe commands to avoid crashes
This commit is contained in:
parent
316ed6b49b
commit
82067d1424
1 changed files with 6 additions and 1 deletions
|
|
@ -184,7 +184,12 @@ function inject(serv,settings)
|
||||||
|
|
||||||
player.on('modpe', function (command) {
|
player.on('modpe', function (command) {
|
||||||
console.log(command);
|
console.log(command);
|
||||||
procCmd(command);
|
try {
|
||||||
|
procCmd(command);
|
||||||
|
}
|
||||||
|
catch(err) {
|
||||||
|
console.log("MODPE error: "+err.stack);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
function newLevel() {
|
function newLevel() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue