Nokorbis / ar-command-signs

Minecraft (Spigot) plugin that allows to transform some blocks (Signs, plates and buttons) into a Commands executor
https://www.spigotmc.org/resources/command-signs.10512/
Apache License 2.0
13 stars 10 forks source link

Feature request: WARN for improperly configured CommandBlocks #42

Closed SlimeDog closed 5 years ago

SlimeDog commented 5 years ago

CommandSigns 2.1.2

Strictly speaking, "was not able to extract ... location" is incorrect; the location is not a valid CommandSigns command block. And the message should be a WARN.

So, instead of:

[21:13:42] [Server thread/INFO]: Was not able to extract command block location from
[21:13:42] [Server thread/INFO]: plugins/CommandSigns/CommandBlocks/configurations/20.json

something like:

[21:13:42] [Server thread/WARN]: Invalid command block location in configurations/20.json

Even better, make the message configurable.

Nokorbis commented 5 years ago

https://github.com/Nokorbis/ar-command-signs/releases/tag/2.1.3.Alpha

SlimeDog commented 5 years ago

Looks good. Note that plugin.yml

version: 2.1.2

SlimeDog commented 5 years ago

Moderately serious issue: WARN messages are produced for worlds that have not yet been loaded, but contain valid signs. My server has 62 such signs, which means 62 lines of incorrect log spam. ARCS needs to wait until the worlds have been loaded. If that is not possible, then only verifiable invalid locations should be reported. Example:

[10:19:44] [Server thread/WARN]: [CommandSigns] Command block location could not be found in: plugins/CommandSigns/CommandBlocks/configurations/47.json (might be from another not-yet-loaded world)

SlimeDog commented 5 years ago

Hmm, ARCS also reports the same incorrect WARN messages on arcs reload, at which time the worlds are certainly loaded, although the relevant chunks may not be. Perhaps the relevant chunks need to be loaded, before assessing whether the signs are at invalid locations.

Nokorbis commented 5 years ago

What plugin are you using for your multi-world ?

SlimeDog commented 5 years ago

Multiverse-Core 4.1.1-SNAPSHOT-b777 Spigot 1.14.4

Nokorbis commented 5 years ago

I don't have the message when the worlds are loaded. Are you sure your worlds are loaded ?

SlimeDog commented 5 years ago

I have no idea if the worlds are loaded with ARCS is enabled. The console/log says that they are loaded before I run reload. How would you like me to verify?

Nokorbis commented 5 years ago

When you have a message saying a command sign is not loaded because of the world Can you /mv tp on the specified world ?

SlimeDog commented 5 years ago

Of course.

Nokorbis commented 5 years ago

I should have asked it another way... Instead of "can you"... I mean "Are you able to..." ?

Nokorbis commented 5 years ago

image This is what happens for me

SlimeDog commented 5 years ago

My mistake. That one world is not loaded. I forgot that I removed it for a previous unrelated test. Mea culpa.

So all good.

Nokorbis commented 5 years ago

I changed the message format to avoid spam : image

I edited the release to have the new version: https://github.com/Nokorbis/ar-command-signs/releases/tag/2.1.3.Alpha2

SlimeDog commented 5 years ago

Really Nice!

Feature request: sort the lists (numerically would be best, but alphanumeric would be ok).

[12:17:22] [Server thread/WARN]: [CommandSigns] Some command signs were not loaded because their location is not valid: 64,53,67,68,54,55,50,51,52,30,31,48,49,59,61,58
[12:17:22] [Server thread/WARN]: [CommandSigns] Some command signs were not loaded because their world could not be found: 20,22,23,34,60,72,73,74,75,76,77,24,25,26,27,28,29,36,37,38,39,32,42,43,44,45,46,47,21,33,40
Nokorbis commented 5 years ago

Will be fixed in next snapshot (Funny it isn't by default, but I guess the OS does not give the files in the order of the file explorer :D)

SlimeDog commented 5 years ago

(Funny it isn't by default, but I guess the OS does not give the files in the order of the file explorer :D)

Linux (Unix) directories are stored in inode order. Without manipulation, the contents will be returned in that order.