renaming mechanism seems to not checking event being cancelled properly
- can be slightly complicated to explain
- I code too, I know what I'm talking
plugins involved : McPets , Lands , Meg
Problem: /pets doesn't open GUI properly
Why the hell are you writing issue of McPets in here?
-> let me explain
Facts
- issue found that /pets command makes indexOutOfBound Exception
- found out this is caused by malformed saved data of McPets
- McPets save pet name in flatfile such as "petId;petCustomName" , ex ) "bear;myCuteBear"
- McPets use meg rename mechanism to rename its pet
- Lands is a protection plugin, and it has lands chat functionality whereas, it will cancel event AsncChatEvent, and send message to land members
Reproduce
- enter lands chat mode ( /lands chat )
- rename pet
- breaks ( pet data is formed in "petid;" , name empty
My thinking
- McPet should handle this exception , and put some default string if it can't read name properly -> problem: dev claims he's unavailable till April , and this issue was there for damn 2 months
- Lands Chat is not culprit, as he's just doing his job
- It probably could be handled by checking if event.isCanclled() return; by not renaming model name if chat is cancelled. -> obviously won't fix malformed data of McPets, but they could be handled. just need this not to be happening more.