garbagemule / MobArena

MobArena plugin for Minecraft
GNU General Public License v3.0
195 stars 151 forks source link

Arena signs only work for kebab-case arena names #705

Closed garbagemule closed 2 years ago

garbagemule commented 2 years ago

Bug report

Short description

Arena signs created for arenas that don't have kebab-case style names in the config-file never update after creation.

Reproduction steps

  1. Create an arena with a name like "Area 53"
  2. Create an arena sign for the given arena (just use the default info template)
  3. Join the arena and observe that the sign does not update

Doing the same thing with arena name like "a1" produces the expected results of the signs updating.

Details

Additional info

The problem is that the procedure that handles arena events uses the configName() method to find the "arena ID", which is the wrong behavior. The "arena ID" is the arena slug, and configName() actually returns the verbatim name from the config-file, which means the lookup in the sign store's findByArenaId() method will fail.

https://github.com/garbagemule/MobArena/blob/caee8be6cace6c64bfe16be0047b85136b433018/src/main/java/com/garbagemule/MobArena/signs/HandlesArenaUpdates.java#L74