瀏覽代碼

Merge branch '1184-dont-block-yourself' into 'temp-v0.5'

Prevent players from blocking themselves

See merge request Isleward/isleward!452
tags/v0.4.4^2
Big Bad Waffle 4 年之前
父節點
當前提交
96cbcd487c
共有 1 個檔案被更改,包括 5 行新增0 行删除
  1. +5
    -0
      src/server/components/extensions/socialCommands.js

+ 5
- 0
src/server/components/extensions/socialCommands.js 查看文件

@@ -258,6 +258,11 @@ module.exports = {
return;
}

if (target === this.obj.name) {
this.sendMessage('You cannot block yourself', 'color-redA');
return;
}

this.blockedPlayers.push(target);
this.sendMessage(`Successfully blocked ${target}`, 'color-yellowB');



Loading…
取消
儲存