Bug Report
Short Description
Using /ma class random or clicking a sign with the word random should work and give the message "You will get a random class on arena start."
Instead, when using /ma class random, it said "There is no class named random."
Did some scuffed fix in a fork and it seems to work (more info in Additional Info).
Reproduction Steps
Using /ma class random or clicking a sign with the word random.
Details
- MobArena version: 0.107
- Server version: paper 1.20.1
- Stacktrace (if applicable):
Additional Info
- In the file
PickClassCommand.java, it seems that the logic for checking if a class slug existed is done before that for checking if the slug is "random". The same goes for the function handleSign in the file ArenaListener.java.
- After fixing that, the player becomes unable to ready, getting the message
"You must first pick a class!". In the ReadyCommand.java, it didn't take into account the arena class being null (in the case of random class). The same goes for the function handleReadyBlock in the file ArenaListener.java.
Two other things I think should be addressed:
- Function
assignRandomClass in ArenaImpl.java didn't support for class chest.
- If a player chooses another kit after running the command
/ma class random, the Arena should remove the player from its randoms set.
Bug Report
Short Description
Using
/ma class randomor clicking a sign with the wordrandomshould work and give the message"You will get a random class on arena start."Instead, when using
/ma class random, it said"There is no class named random."Did some scuffed fix in a fork and it seems to work (more info in Additional Info).
Reproduction Steps
Using
/ma class randomor clicking a sign with the wordrandom.Details
Additional Info
PickClassCommand.java, it seems that the logic for checking if a class slug existed is done before that for checking if the slug is "random". The same goes for the functionhandleSignin the fileArenaListener.java."You must first pick a class!". In theReadyCommand.java, it didn't take into account the arena class beingnull(in the case of random class). The same goes for the functionhandleReadyBlockin the fileArenaListener.java.Two other things I think should be addressed:
assignRandomClassinArenaImpl.javadidn't support for class chest./ma class random, theArenashould remove the player from itsrandomsset.