-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Random Class Selection Issue #786
Comments
Thanks for the bug report and for taking the time to dig into what's going on :) It sounds like maybe the random class assignment isn't working correctly. Browsing through the code, it does seem like there is at least one missing null check in the |
Just tried clicking a class sign with Definitely a bug. Not sure when it was introduced. |
For your reference, this is the commit of the fix on my fork for a private server, it is quite scuffed tho: (sorry but please ignore the changing gamemode to adventure line, as it is for another thing) |
Oh wow, I never reported back on this. Sorry! I did do some digging back then, and I found out that the bug was introduced June 8, 2012 (!!), so ever since the class limits were introduced, random class selection via signs hasn't worked. To sum up some of my ramblings on Discord about this issue:
I know it's been a long time since you reported this issue, but are you still using random class assignments today? Is it a feature you still care about? |
@covector I'm a little tardy to the party, but.
|
Bug Report
Short Description
Using
/ma class random
or clicking a sign with the wordrandom
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 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 functionhandleSign
in 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 functionhandleReadyBlock
in the fileArenaListener.java
.Two other things I think should be addressed:
assignRandomClass
inArenaImpl.java
didn't support for class chest./ma class random
, theArena
should remove the player from itsrandoms
set.The text was updated successfully, but these errors were encountered: