Permission messages are printed (spammed) many times
Nightenom opened this issue ยท 2 comments
Minecolonies version
version 1.12.2-0.8.8208 (forge 2681)
Expected behavior
- one correct message per action
Actual behaviour
- any action spams up to 4 messages into chat:
- left click (attack, destroy block, etc.) - 2 "You do not have permission to do this in this colony." (= basic) instead of one
- placing hut - 3 basics + one "You do not have permission to open huts in %s" instead of "place huts" permission
- right click with empty hand or as an action (open door, etc.) - 4 basics
- right click on an item frame - 8 (yeah, eight) basics, with shift key pressed - 10 basics
- right click with item triggering .itemOnUse() - 1 basic (instead of zero, I dunno if it's possible to supress it)
- opening hut - 3 basics instead of "open huts"
Steps to reproduce the problem
- setup colony
- switch owner
- as a neutral player try to do any problematic action
We can use the LanguageHandler to suppress one message getting sent to chat not again in e.g. 1.5 sec (since all strings go through that class), especially when the string contains command/permission in a name
And make one message (like "You have no rights in %s's colony") if a certain player has no relation to a certain colony