Closed mibby closed 6 years ago
Hah, the /ma load part is probably due to a refactor action in IntelliJ overreaching.
Anyway, there will be more in the log if this is properly compiled and loaded. That message literally cannot be printed unless there is a message before it. Check the source code in MobArena.java.
Edit: Note that the message that's printed before the "Fix it" message contains newlines to make the error stand out. It could be that your terminal or your server implementation does nasty things to such messages. I've tested on Spigot and in iTerm2 with zsh as well as in IntelliJ's own console and had no issues with errors displaying.
Very weird.
The only console parsing changes as far as I can remember having is what comes stock in Multicraft's start-up jar configuration.
## Console output parsing can be completely customized to support
## any format (and theoretically any game). Please contact us if you require this.
[parse_startup]
start1=^\s*Listening on
[parse_log]
start=^(?P<time>(:?[-\d]+ )?\[?[:\d]+\]?)\s+\[?(?P<type>[^]]+)\]\:?\s+(:?\[[^]]+\]\s+)?(?P<line>.*)$
[parse_players]
start2=Total players online: (?P<v_maxDataLines>\d+)
[parse_clean]
start=(^[>\r\s]+|\x1b(\[|\])[0-9;]*m?|\x08)
Java start-up arguments and Paper Spigot shouldn't have any changes to strip things that I can recall.
The plugins LuckPerms, Boss, ChatControlPro, and SketchMap that I use have newlines that properly display in my console logs, it just seems to be MobArena that is missing the top part of that error message.
In any case, what changed in the config that now needs fixing? :P
@garbagemule
It seems reloading in-game does output what is wrong.
Failed to parse wave growth for wave normal1 of arena default: 2
normal1:
type: default
growth: 2
priority: 1
frequency: 1
monsters:
zombies: 3
spiders: 3
Is growth no longer a feature? I can't find what is wrong with it.
Edit: Ah, I see now. It is now enforced to use these values.
OLD(0), SLOW(0.5), MEDIUM(0.65), FAST(0.8), PSYCHO(1.2);
The rewrite for ThingParser seems to break specifying data values in an item too. While it makes sense for 1.13 forward due to material name flattening, I'm not sure how I can specify skull_item:5:1
(Dragon Head) in 1.12.2 for now until updating to 1.13.
https://github.com/garbagemule/MobArena/commit/cd82a896262daf5282e1e67a9bb8e12eda359a59
Alright, lots of topics springing from this, so let's take them one at a time:
ItemParser rework
Nothing in the config-file has changed w.r.t. items. It's just the parsing that has been reworked to move away from magic numbers in item IDs and data values. The commit that breaks support for skulls is this one: b5b4fdd30afe9f08a1233603936a07f98ffbf730. With the new way things are set up in the ItemParser class, it isn't unlikely that we can fit skulls in. Create a new issue for that, preferably with some examples of how we can handle it without magic values, i.e. skull_item:dragon:1
is preferable to skull_item:5:1
, so if there are other plugins that support this type of notation, it'd speed things up if I could use them as a reference. If it needs to be magic values, we'll have to see if we can make it work without breaking things going forward (1.13) and backward (1.8).
Parsing logic rework The reason you haven't seen your wave growth as an error before is because MobArena previously just defaulted to something else if it couldn't resolve the value. The parsing logic rework is fail-fast and merciless. This should result in fewer surprises at run-time, and it forces people to fix their config-files instead of letting them stay broken. Note that this behavior is intended and not a bug.
Missing log message
Can you please try spinning up a normal Spigot server with your config-file to see if that solves the problem of the missing log message? Here's what I get if I put skull_item:5:1
in my config-file with a build from the commit you've referenced:
[14:14:41 INFO]: [MobArena] Enabling MobArena v0.102.1-SNAPSHOT
[14:14:41 INFO]: [MobArena] Vault was not found. Economy rewards will not work.
[14:14:41 ERROR]: [MobArena] You have an error in your config-file!
Failed to parse item for class Archer: skull_item:5:1
[14:14:41 ERROR]: [MobArena] Fix it, then run /ma load
And if I put a wave growth value of 2
:
[14:17:05 INFO]: [MobArena] Enabling MobArena v0.102.1-SNAPSHOT
[14:17:05 INFO]: [MobArena] Vault was not found. Economy rewards will not work.
[14:17:05 ERROR]: [MobArena] You have an error in your config-file!
Failed to parse wave growth for wave def1 of arena a1: 2
[14:17:05 ERROR]: [MobArena] Fix it, then run /ma load
So apart from the /ma load
being wrong, things seem to work as expected on Spigot.
Missing log message Can you please try spinning up a normal Spigot server with your config-file to see if that solves the problem of the missing log message?
Funnily enough, that does seem to fix it! Spun up the last build committed for Spigot 1.12.2 with the same multicraft console start-up settings.
[05:27:23] [Server thread/INFO]: [MobArena] Enabling MobArena v0.102.1-SNAPSHOT
[05:27:23] [Server thread/INFO]: [MobArena] Vault found; economy rewards enabled.
[05:27:23] [Server thread/WARN]: [MobArena] The leaderboard-node for arena 'default' does not point to a sign!
[05:27:23] [Server thread/ERROR]: [MobArena] You have an error in your config-file!
Failed to parse wave growth for wave normal1 of arena default: 2
[05:27:23] [Server thread/ERROR]: [MobArena] Fix it, then run /ma load
I guess a custom patch inside Paper is stripping the newline character in MobArena -- it's just odd that it doesn't happen with any of the other listed plugins which also do have a newline separation in its console start-up verbose. At first glance, here are a few patches that touch console within Paper.
Parsing logic rework The reason you haven't seen your wave growth as an error before is because MobArena previously just defaulted to something else if it couldn't resolve the value.
I see. Well in any case, glad it is now enforced so the proper and actual functional value can be defined. :)
ItemParser rework It's just the parsing that has been reworked to move away from magic numbers in item IDs and data values. With the new way things are set up in the ItemParser class, it isn't unlikely that we can fit skulls in. Create a new issue for that, preferably with some examples of how we can handle it without magic values.
Sure, I can create a new ticket for that. Outside of a private remapping lists used in plugins such as protocol version support, I think most plugins that deal with multiple versions keep a type of legacy item ID referencing for older versions. There's also Essentials(X) with its items.csv file but I think that is being rewritten for 1.13.
Not sure what the best approach for MobArena is.
Outside of the dragon head, I also had red_rose:1:64 and quartz_block:1:64, but those are probably inherited from a config coming from older MC versions over the years.
it's just odd that it doesn't happen with any of the other listed plugins which also do have a newline separation in its console start-up verbose.
If you could link to the places in the codebases where the newlines are logged, maybe we could find an answer there? I'm just using \n
, which I imagine the other plugins would also be using.
It's possible all of the plugins are just parsing an empty line instead of using a newline. I'm not able to check two of them because they are closed source.
Right, I think the best bet here is to contact the developers of the server implementation and ask them what's up. It makes no sense to just not show messages with newlines in them. At the very least, just ignore/remove the newlines and stick everything on the same line. But this is not a MobArena issue.
Please report back here with their response :)
@garbagemule
Upon further deep testing, it seems to be a conflict with the plugin ConsoleSpamFix.
ConsoleSpamFix v1.6.0 Paper dev 1550 (Spigot 1.12.2)
CSF Config https://paste.ubuntu.com/p/ZX2D5KNpnb/
I'm not sure why it is conflicting and stripping newlines from Mobarena, as my config isn't set to do so, but I'll forward this to the appropriate dev since I don't think it is an issue with Paper or MobArena.
Thanks @mibby!
MobArena compiled as of commit https://github.com/garbagemule/MobArena/commit/548d8c7e4fe670e857f27c9b484f897e6f38df77
What am I suppose to fix? :(