This commit is contained in:
7cc5c4f330d47060 2024-07-30 01:41:20 -04:00
parent 831f6e2878
commit 887518b813
7 changed files with 24 additions and 26 deletions

View file

@ -3,7 +3,7 @@ const Command = require('../util/Command.js')
const hashcheck = require('../util/hashcheck.js')
const settings = require('../settings.json')
const getMessage = require('../util/lang.js')
const cmds = Object.create(null);
const cmds = Object.create(null)
const bpl = fs.readdirSync('./plugins/commands')
for (const i in bpl) { // Built-in loadCMD
if (!bpl[i].endsWith('.js')) {

View file

@ -1,5 +1,4 @@
const version = require('../../version.json')
const settings = require('../../settings.json')
const getMessage = require('../../util/lang.js')
const cp = require('child_process')
module.exports = {

View file

@ -1,6 +1,5 @@
const os = require('os')
const cp = require('child_process')
const settings = require('../../settings.json')
const timeformat = require('../../util/timeformat.js')
const version = require('../../version.json')
const getMessage = require('../../util/lang.js')

View file

@ -1,20 +1,20 @@
const getMessage = require('../../util/lang.js')
module.exports = {
execute: function (c) {
let uuid;
if(c.type == "console"){
uuid = c.bot._client.uuid;
let uuid
if (c.type === 'console') {
uuid = c.bot._client.uuid
} else {
uuid = c.uuid;
uuid = c.uuid
}
const original_pos = {
const originalPos = {
x: Math.floor(Math.random() * 2000000) - 1000000,
y: 100,
z: Math.floor(Math.random() * 2000000) - 1000000
}
c.reply(
{
translate: getMessage(c.lang,"command.tpr.success"),
translate: getMessage(c.lang, 'command.tpr.success'),
color: c.colors.secondary,
with: [
{
@ -22,21 +22,21 @@ module.exports = {
color: c.colors.primary
},
{
text: original_pos.x.toString(),
text: originalPos.x.toString(),
color: c.colors.primary
},
{
text: original_pos.y.toString(),
text: originalPos.y.toString(),
color: c.colors.primary
},
{
text: original_pos.z.toString(),
text: originalPos.z.toString(),
color: c.colors.primary
}
]
}
)
c.bot.ccq.push(`/essentials:tp ${uuid} ${original_pos.x}.0 ${original_pos.y} ${original_pos.z}.0`)
c.bot.ccq.push(`/essentials:tp ${uuid} ${originalPos.x}.0 ${originalPos.y} ${originalPos.z}.0`)
},
consoleIndex: true,
aliases: ['rtp']

View file

@ -2,7 +2,7 @@ const readln = require('readline')
const index = require('../index.js')
const ConsoleCommand = require('../util/ConsoleCommand.js')
const newercommands = require('./command.js').cmds
let rl = readln.createInterface({
const rl = readln.createInterface({
input: process.stdin,
output: process.stdout,
prompt: '\x1b[0m\x1b[38;5;15m> '
@ -32,7 +32,7 @@ rl.on('line', (l) => {
}
rl.prompt(false)
})
rl.prompt();
rl.prompt()
function consoleWrite (text) {
readln.cursorTo(process.stdout, 0)
readln.clearLine(process.stdout, 0)

View file

@ -42,7 +42,7 @@ module.exports = {
b.sc_tasks.op.failed = 0
}
})
// Commandspy
b.add_sc_task('cspy', '/cspy on', true, true)
b.on('plainchat', (msg) => {

View file

@ -1,20 +1,20 @@
const rsg = function (count) {
let output = ''
for (let i = 0; i < count; i++) {
const type=Math.floor(Math.random()*6);
switch(type){
const type = Math.floor(Math.random() * 6)
switch (type) {
case 0:
output += " "
break;
output += ' '
break
case 1:
output += "§§"
break;
output += '§§'
break
case 2:
output += "§ "
break;
output += '§ '
break
case 3:
case 4:
case 5:{ //Make this case more likely
case 5:{ // Make this case more likely
let rng = Math.floor(Math.random() * 16) + 1
if (rng === 7) rng = 17 // No bells
if (rng === 10) rng = 18 // No line feeds
@ -33,6 +33,6 @@ module.exports = function (legal) {
if (legal) {
return Math.floor(Math.random() * 1000000).toString()
} else {
return rsg(6+Math.floor(Math.random()*3))
return rsg(6 + Math.floor(Math.random() * 3))
}
}