hello, for quite some time I asked myself a question, how to save data permanently even if I leave the map for example when I kick a person (with a UI) it will log that and I can display a history even if I restart the map it will still be there also if I make a ban / temp ban system I must register the banned players and be able to ban / unban them even if they are not present because I would like to be able to make an interface that allows ban/tempban mute/tempmute but to record calculated ban time etc... it is complicated
#Need informations for DB, TempBan etc...
1 messages · Page 1 of 1 (latest)
Srry if the trad is bad but my eng is not good and for that i have used Google translate
- scoreboards objective with fakeplayers as ur data
- in entity's tags
- in item's lore
- in entity inventory with items and data stored in lore
are your the only few options gor permanent data storage
dynamic properties where
not db
store a stringified json object inside a dynamic property 
nah but none of these are a db either
just use bds with server-net
and host your database externally
bruh no use bds this chat is all about local game rarely ppl do bds stuff idk why u keep suggesting everyone to use net and db external xddd
cuz its just better lmao
Cuz in his bio he's hosting stuff
@carmine moat I want to try but I have never used net
In wiki net is usable only in dedicated server rip
yeah bds
nah we dont even host databases (as of right now) at nodiumhosting
its just that using an actual database is generally better for everything
@carmine moat because i want made advancee ban system with time ban/time mute etc...
yeah, idrk how to do that without a db so unfortunately cant help you
I have a question for runCommandAsync()
yes?
How to check if the command failed as if I do /kick on myself normally it's not possible and how did we detect that
/*code*/.runCommandAsync(/*command**/).then((res) => {
if (!(res.successCount >= 1)) {
//command ran successfully
}
})
iirc
@carmine moatI dont need to use that?
oh right im stupid
updated
I try
@carmine moat if i put this isnt work
//Kick
async function openKick(player) {
const ModalForm = new ui.ModalFormData()
const players = mc.world.getAllPlayers().map(player => player.name)
ModalForm.title("Menu Exclure")
ModalForm.dropdown("Joueur", players, 0)
ModalForm.textField("Raison", "Raison (facultatif)")
ModalForm.toggle("Afficher pour tous les joueurs", false)
ModalForm.show(player).then(response => {
if (response.canceled) {
openMain(player)
return
}
let [dropdown, reason, toggle] = response.formValues
if (reason.trim().length === 0) reason = "Non Spécifié"
player.runCommandAsync(`kick "${players[dropdown]}" '\n§ePar: §l§6${player.name}\n§r§eRaison: §l§6${reason}`).then((res) => {
if (!(res.successCount >= 1)) {
//command ran successfully
switch (toggle) {
case true:
player.runCommandAsync(`tellraw @a {"rawtext":[{"text":"§l§7[§4Exclusion§7] §r§eLe joueur §l§6${players[dropdown]} §r§eà été exclue par §l§6${player.name} §r§epour §l§6'${reason}'"}]}`)
break
case false:
player.runCommandAsync(`tellraw @s {"rawtext":[{"text":"§l§7[§4Exclusion§7] §r§eLe joueur §l§6${players[dropdown]} §r§eà été exclue par §l§6${player.name} §r§epour §l§6'${reason}'"}]}`)
break
}
} else {
mc.world.sendMessage('hi')
}
})
//player.runCommandAsync(`kick "${players[dropdown]}" '\n§ePar: §l§6${player.name}\n§r§eRaison: §l§6${reason}`)
})
}
odd
does it give you any error?
No it do nothing
odd
??
Wth is .finally
It used to ran something after the runCommand ran