Rename userSettingsDisabled to disableUserSettings
This commit is contained in:
parent
06cfc7347d
commit
a71121225c
5 changed files with 6 additions and 6 deletions
|
@ -16,7 +16,7 @@ for (const plugin of bpl) {
|
|||
}
|
||||
try {
|
||||
const commandName = plugin.split('.js')[0]
|
||||
if (commandName === 'settings' && settings.userSettingsDisabled) continue
|
||||
if (commandName === 'settings' && settings.disableUserSettings) continue
|
||||
if (commandName !== 'help') {
|
||||
cmds[commandName] = require(`./${plugin}`)
|
||||
if (cmds[commandName].level === undefined) {
|
||||
|
|
|
@ -10,7 +10,7 @@ module.exports = {
|
|||
})
|
||||
return
|
||||
}
|
||||
if (settings.userSettingsDisabled) {
|
||||
if (settings.disableUserSettings) {
|
||||
c.reply({
|
||||
text: getMessage(c.lang, 'command.settings.disabled.global'),
|
||||
color: c.colors.secondary
|
||||
|
|
2
index.js
2
index.js
|
@ -8,7 +8,7 @@ if (!fs.readdirSync('.').includes('settings.json')) {
|
|||
if (!fs.readdirSync('.').includes('secret.json')) {
|
||||
console.log('Secrets file is missing, using defaults.')
|
||||
fs.copyFileSync('secret_example.json', 'secret.json')
|
||||
console.log('Please change the hashing keys in the secrets file.')
|
||||
console.log('Please change the hashing keys in the secrets file. It is also recommended to remove permissions of other users to read from this file, for example, by giving it 600 permissions if running on a Unix or Unix-like OS.')
|
||||
}
|
||||
|
||||
const m = require('minecraft-protocol')
|
||||
|
|
|
@ -4,11 +4,11 @@ const { getMessage } = require('../util/lang.js')
|
|||
const cmds = require('../util/commands.js')
|
||||
const fs = require('fs')
|
||||
|
||||
if (!fs.readdirSync('.').includes('userPref') && !settings.userSettingsDisabled) fs.mkdirSync('userPref')
|
||||
if (!fs.readdirSync('.').includes('userPref') && !settings.disableUserSettings) fs.mkdirSync('userPref')
|
||||
|
||||
const loadSettings = function (uuid) {
|
||||
try {
|
||||
if (settings.userSettingsDisabled) {
|
||||
if (settings.disableUserSettings) {
|
||||
return {}
|
||||
} else {
|
||||
return require(`../userPref/${uuid}.json`)
|
||||
|
|
|
@ -8,7 +8,7 @@ for (const plugin of bpl) {
|
|||
}
|
||||
try {
|
||||
const commandName = plugin.split('.js')[0]
|
||||
if (commandName === 'settings' && settings.userSettingsDisabled) continue
|
||||
if (commandName === 'settings' && settings.disableUserSettings) continue
|
||||
cmds[commandName] = require(`../commands/${plugin}`)
|
||||
if (cmds[commandName].level === undefined) {
|
||||
cmds[commandName].level = 0
|
||||
|
|
Loading…
Reference in a new issue