My next post in the Chunk Diaries relates to our (soon to be obsolete) ChunkStats and ChunkCredits plugins. I wrote them in September and October 2013 respectively.
ChunkStats was a fork of the old MinerWare accolade system, that had been subjected to some code clean-up. It's served us very well, but the UUID migration is taking its toll on the poor thing, and we decided it was time for a new system, which will be discussed in further detail in a later post.
ChunkCredits is slightly more interesting. I remember fondly several funny issues from it:
- Credits duplication issue. This boiled down to
amt = get(p) + get(p) + AMOUNT, but back then my code wasn't extremely clean.
- The issue of handling multipliers was really big back then. We just settled on handling them via permissions, which work well enough.
- There were plenty of credit loss issues. I fixed this by just incrementing the entry as soon as credits were added.
ChunkCredits's issues were the main impetus in which I started on ChunkCommons, which I am going to review later.