itzg / rcon-cli

A little RCON cli based on james4k's RCON library for golang
Apache License 2.0
180 stars 17 forks source link

Symbol / Text / Unicode Issues with Spigot / Bukkit Console? #4

Closed cluelessperson closed 3 years ago

cluelessperson commented 5 years ago

LANG=en_US.UTF-8

#docker exec -it minecraft rcon-cli
> help
§e--------- §fHelp: Index (1/25) §e--------------------
§7Use /help [n] to get page n of help.
§6Aliases: §fLists command aliases
§6Bukkit: §fAll commands for Bukkit
§6LuckPerms: §fAll commands for LuckPerms
§6Minecraft: §fAll commands for Minecraft
§6WorldEdit: §fAll commands for WorldEdit
§6WorldGuard: §fAll commands for WorldGuard
§6/.s: §fExecute last CraftScript
§6//: §fToggle the super pickaxe function

> 
itzg commented 5 years ago

Ah, they're using chat formatting codes

https://minecraft.gamepedia.com/Formatting_codes

I'll work on normalizing those out of the content...or get really fancy with terminal color escape codes.

itzg commented 5 years ago

Just noting that this library looks promising since it seems to auto-detect the environment to colorize or not

https://github.com/gookit/color

anthr76 commented 4 years ago

Using the rcon-cli none of my commands work. I'm assuming it's something to do with the Unicode?

§e--------- §fHelp: Index (1/27) §e--------------------
§7Use /help [n] to get page n of help.
§6Aliases: §fLists command aliases
§6Bukkit: §fAll commands for Bukkit
§6Essentials: §fAll commands for Essentials
§6EssentialsSpawn: §fAll commands for EssentialsSpawn
§6LuckPerms: §fAll commands for LuckPerms
§6Minecraft: §fAll commands for Minecraft
§6sleep-most: §fAll commands for sleep-most
§6VariableTime: §fAll commands for VariableTime

> sleep-most
Unknown command. Type "/help" for help.

> /sleep-most
Unknown command. Type "/help" for help.

> §6sleep-most  
Unknown command. Type "/help" for help.

> "/help"
Unknown command. Type "/help" for help.

> "sleep-most"
Unknown command. Type "/help" for help.

> /help
Unknown command. Type "/help" for help.

> help
To view help from the console, type '?'.

> ?
§e--------- §fHelp: Index (1/27) §e--------------------
§7Use /help [n] to get page n of help.
§6Aliases: §fLists command aliases
§6Bukkit: §fAll commands for Bukkit
§6Essentials: §fAll commands for Essentials
§6EssentialsSpawn: §fAll commands for EssentialsSpawn
§6LuckPerms: §fAll commands for LuckPerms
§6Minecraft: §fAll commands for Minecraft
§6sleep-most: §fAll commands for sleep-most
§6VariableTime: §fAll commands for VariableTime

> ? 2
§e--------- §fHelp: Index (2/27) §e--------------------
§6Vault: §fAll commands for Vault
§6/advancement: §fA Mojang provided command.
§6/afk: §fMarks you as away-from-keyboard.
§6/antioch: §fA little surprise for operators.
§6/back: §fTeleports you to your location prior to tp/spawn/warp.
§6/backup: §fRuns the backup if configured.
§6/balance: §fStates the current balance of a player.
§6/balancetop: §fGets the top balance values.
§6/ban: §fBans a player.

> ? 3
§e--------- §fHelp: Index (3/27) §e--------------------
§6/ban-ip: §fA Mojang provided command.
§6/banip: §fBans an IP address.
§6/banlist: §fA Mojang provided command.
§6/beezooka: §fThrow an exploding bee at your opponent.
§6/bigtree: §fSpawn a big tree where you are looking.
§6/book: §fAllows reopening and editing of sealed books.
§6/bossbar: §fA Mojang provided command.
§6/break: §fBreaks the block you are looking at.
§6/broadcast: §fBroadcasts a message to the entire server.

> ? 3
§e--------- §fHelp: Index (3/27) §e--------------------
§6/ban-ip: §fA Mojang provided command.
§6/banip: §fBans an IP address.
§6/banlist: §fA Mojang provided command.
§6/beezooka: §fThrow an exploding bee at your opponent.
§6/bigtree: §fSpawn a big tree where you are looking.
§6/book: §fAllows reopening and editing of sealed books.
§6/bossbar: §fA Mojang provided command.
§6/break: §fBreaks the block you are looking at.
§6/broadcast: §fBroadcasts a message to the entire server.

> ? lp
§e--------- §fHelp: /lp §e-----------------------------
§eAlias for §f/luckperms
§6Description: §fManage permissions
§6Usage: §f
§6Aliases: §f§flp, perm, perms, permission, permissions

> ? lp usage
§cNo help for lp usage

> ?lp luckperms
Unknown command. Type "/help" for help.

What would be the correct syntax to execute commands?

456dev commented 4 years ago

By sending a valid command I guess sleep-most Is a name of a plugin, (so ? sleep-most is valid) Console commands are not prepended by / or chat colour codes ? lp usage is not valid since there is no plugin or command call that.

?lp luckperms and that is an invalid command

Correct way: For /lp help Type lp help and press enter

bram-pkg commented 3 years ago

Any update on this? @itzg

Need a hand on this?

itzg commented 3 years ago

Oops, this one fell off my radar. Sure, any help would be appreciated.

bram-pkg commented 3 years ago

Haha, no worries. I'm not too familiar with Go but I'll take a look tonight.