Blog registration & changing usernames

As you know, we have been using the blog for whitelisting for quite some time. With the changing username, there are 2 issues coming up:

  1. If you change your username and comment on something, nobody will know who commented, since the name in the blog will be different than in-game.
  2. If you abandon a username, someone else can pick it. But they won’t be able to whitelist here, since someone else who does not use the username in Minecraft anymore, still uses it as their log on the blog.

to identify users, I already store the new UUID in the wordpress table, so I can link a website user to their minecraft persona, no matter if the username in the game changes.

So to fix point 1., I have to make sure that the username shown in the blog stays updated to whatever your in-game username is. The good thing is that there is a so-called “Nickname” on everyone’s profile. If I manage to prevent users from manually changing it, I can update it to always show the username that the minecraft profile has.

To fix point 2. I have to either allow users to register with ANY username and ask them for their current minecraft username and store that one along with their UUID for identification, or I have to set their username on the website to their UUID. Since it would be quite annoying to register and login with the UUID since nobody remembers that 36-digit code, I would have to change the login and registration pages to ask the users for their current minecraft username and lookup the UUID with the code to fill their login-form automatically. While this is cleaner, it also seems more complicated.

The good thing is that the solution for point 1. has to be done in both cases to solve 2., so if I fix that one, it would a good step ahead to solve the issue. This is why I asked the question here, and hope to get an answer soon. To all those who currently set a custom nickname on the website, sorry but that will go away.

 

Big, [not so] bad news: Bukkit is [not] dead. What next? [Update]

This is developing fast. Updates are underlined.

Please read this here. Essentially it means that the platform on which our server is running, will not be developed further by the original team. What does this mean?

  • We will most likely not be able to upgrade to 1.8
  • We will be able to continue running with what we have, but for the time being, but there will be no updates, no changes, no new versions of the game. No new blocks, no new features. It’s a 100% standstill.

The only valid option for us to work with future versions of Minecraft are the following:

  • Someone picks up the work and develops the code further, despite the issues about licensing that is described in the article above. There is still the spigot community, but they have only worked with an optmized bukkit code, and it’s questionable if they will be able to pick up the additional work that is not done anymore by the bukkit guys (Twitter says they won’t Sorry, misread that, they will).
  • Mojang takes over the Bukkit work and makes it available under a proper license, since there are only very few servers that actually work without it. (seems that this is a valid alterantive as we can see here and here)
  • Mojang finally releases a proper plugin-system which attracts the most important developers that make this server what it is, namely the creators of Websend and Worldguard to work with it. The risk is however that the gap between the end of Bukkit and the first proper native plugin-system for Minecraft will be so far apart that the plugin devs stop working and do not pick it up later anymore.

The main problem finally is that the biggest features that make this server run are the lots and the custom code that we have on the server. Without the protected lots and the work that I put into the system the server basically boils down to a vanilla minecraft server where the only protection that we have against idiots would be a tough whitelist test – all using a manual whitelist approval instead being able to automate stuff.

What will I do?

Well I will keep the server up and running as long as possible. I put 3 years of work into it and will not just drop it like a hot potato. But I will slow down/stop the work on preparing for 1.8 for the time being until I have a reason to believe that there will be actually a possibility to ever get this version.

Seing the mojang team will take this over, there is a high chance that this will continue. The question is if this will speed things up or slow them down. So far, so good, we will see what happens. Please continue building. Nothing to see here.

Settler Application improvement

I made the Settler test even more fool proof user friendly: It seems that some users could not find the radio button on the lots to select a lot. Now, instead of having to click on the radiobutton, you can click anywhere on the lot to select the radiobutton.

On top of that, the “next” button on the top changes to “Choose lot EMP_A1” or whatever lot the user chose. I hope this will reduce the questions.

Some progress

I now converted the donations, the stories, the banned users, the whitelist, the Unc-accounts and the karma system from usernames to UUIDs.

Further, I implemented a cascading system that tries to retrieve UUIDs from 4 different sources for a user, namely the blog-registered users, another database to store new users, todays logfile (it registers the UUID of every user that even tries to login on the server, stuff found there is then written to the previous database for later usage) and if all those fail, tries to get it directly from Mojang. I needed to do this since I now need to have the UUID even before the user is registered and if I go directly to Mojang too often, they block me for 1 hour.

There are still a bunch of items left that I need to convert to UUIDs, but there are 2 main plugins that I use on the server (logblock and worldguard) that store important information and so all code that I write right now has to work with both usernames and UUIDs.

I will have to wait until those two are updated and then change all the code accordingly. I assume this should be all feasible before we would be otherwise able to upgrade to 1.8, so this item should not be delaying any upgrades.

New Citizen status regulation

We had repeating cases of users who registered and never came back for months. Then, they would show up again, after having spent no time on the server at all, and become Citizen status immediately. To stop this issue and on top of that reward people who are online a lot in the first weeks after registering, we have now a new way to determine when someone becomes Settler: After they have been online, in the game, for more than 60 hours.

As before, you can see how far you are to become Settler on the sidebar Server Status box. It will show now the hours you have been online, and if you are Settler, how many more hours you need to become Citizen.

I am convinced that this is a much fairer way to determine who should get Citizen status and therefore benefit the community. Users who reached Citizen status already will not be affected by this change, only existing and new Settlers.

Newly promoted Citizen because of this scheme are:

  • stephdeg
  • kaizlin
  • allicrev
  • beau1201
  • wickedXxxxlego
  • Papa_Jynx
  • gamergirlxoxoxo

Congratz!

Oh, yes before I forget, the idea was from pinebenj! So if you had your upgrade delayed because of this, make sure to throw a cake a him :D

Hunger Game revival

AS you know, we have not used the hunger games for a while. The issue was that we always used a new world to do them, but regenerating new worlds while the server was online proved to be very difficult and often either failed or crashed the server.

So I now had a new idea how to do that differently that might be easier to do:

I can generate a worldguard region (the same system that we use for lots) that has an entry/exit flag set. This would disallow anyone who is inside to leave it (except when they die) and anyone outside to enter it. What we most likely cannot do is to shrink the region over time as we did with the other system, but still it would be a proper hunger game – in the darklands. We would pick a random spot somewhere some million blocks out and create a region, set the “no exit” flag and then, when everyone is inside and the game start, we set the “no entry” flag and we are set.

I will have to go through the code of the old system and see what we can recycle. No ETA yet, but I just tested the flags and this seems quite easy to do – much easier than the old system for sure.

Darklands Challenge, anyone?

I have been thinking it would be fun to have a darklands challenge:
You buy a “ticket” for some Uncs (how many, that’s the question) and the system would teleport you to the darklands, but very, very far out (i.e. 200k blocks+). And your challenge would be to try to come back.

Anyone interested in that? If so I could make that, since it’s not difficult. But I would like to hear everyone’s opinion first.

New Shop Manager!

In an effort to further streamline and simplify the website, I have now created a shop manager, similar to the lot manager. At this moment this includes only the personal shop & deposit pages as well as the help informations for shop and deposit, but will eventually grow to host a much more versatile, 100% recursive database where any information can be called through one interface and replace the pages related to the shop in the “Features” menu.

There will be also a revamp of the main menu once the current shop pages in the main menu are removed to make navigation simpler than it is today.

Go-Go Usericon Gadget!

Since I had some quite frustrating day yesterday preparing the server for UUIDs (the server was down for over 1 hour) I now dropped into a more rewarding gadget-frenzy and added a list of usericons to the frontpage that shows all users that logged in during the last 49 hours. The colored bar next to them shows if they are still online or not, and hovering above them shows when they have logged in last time…

have fun!

Code speed-up

I made the userlist now use UUIDs instead of usernames, and now it loads in a few seconds instead of half a minute.
I also optimized the code loading the 2D map, and that one should now also load in 5-7 seconds instead of 20-30.

Yay!

Preparing for 1.8

I have worked in the past months here and there to prepare for the rough outlines of 1.8 by introducing a table of UUIDs (long series of numbers and letters which will replace usernames in the code) and block names (which will replace block numbers).

So far the backend of the whole thing works, and I have the new data for pretty much everything and everyone. The issue however is that the code still uses numbers for blocks (in the shop for example) and usernames to identify people (pretty much everywhere). It is time now, with 1.8 coming, to end that.

So right now I am going through the whole code form top to bottom and change every time where someone is identified with a username to their UUID. At the same time, I have to go through all the tables, add a UUID field, populate that with the UUID that matches the username in the line and then change the code that calls the table to use that new UUID field. Then I can remove the username field from the table.

The biggest advantage of this is that I do not have to deal with differently capitalized usernames anymore: Users used different capitals in-game than when registering on the blog. Some plugins who use tables use capitals, others do not. If I am not sure if 2 tables use the same methods, lookups between two tables have to be done with a “IF a LIKE b” instead of “IF a = b”, which is much, much slower. For example, the fact that the user list takes more than 30 seconds to be generated, is because of this issue.

So expect some small bugs while I am working on the code :). It will probably take 1-2 weeks, depending on what comes up.

Idea for banners

While the possibility to use banners is still some weeks away (1.8 has to be released, then all the plugins updated, and then we need to upgrade), I have been thinking it would be cool if we could have a system where users can define a banner that is unique and cannot be used by other people. Please note this is a draft and I am not even sure if this is feasible. See why below.

To achieve that we would have to:

  1. Disable manual creation of banners. Banners would be made on-line (on a website like this) and then given to yourself with a command (and possibly for money).
  2. Users could reserve an amount of banners for themselves, depending on their user level and donator status. Those reserved banners would belong to them, and nobody else would be able to make the same banners.
  3. Optionally, certain colors or elements would be permitted only for certain userlevels. So for example, only DonatorPlus would be able to use the Creeper logo, and only Elders would be able to use the color Purple
  4. In order to force a certain complexity, there would be a minimum of 4 layers so nobody can reserve a black only banner.
  5. To prevent that people do not make a black only banner by covering up 2 other elements by a black top and black bottom half, a logic would have to be introduced that prevents banner-filling patterns on top of other things. This should be possible, but probably complicated. If this is somehow not possible, the whole thing would become a bit meaningless.
  6. In order to make better use of rare items to be used for banners (creeper & wither skelly heads), we could require people to actually have one of the items in their inventory before they can get a banner.
  7. Potentially we could also limit the amount of layers per user level.
  8. Any pattern/color combination that is not reserved in any way would be available for anyone, anytime.

So I guess the whole thing stands and falls with this question: Can we have a logic, that would prevent reserved banners to be replicated easily with a different, but similar pattern?

One way to do that is to require the reserving user to simply pay attention that they do not create a banner that is easily replicated. The other way is that we simply do not allow more than one of the elements that would in combination cover the whole surface.

Any other ideas that could make this more interesting/feasible?

 

User Icons workaround

So far, we have been retrieving user icons live from the Minotar website. while this works fine 99% of the time, it sometimes fail on the one or other user and this screws up things like the 2D map, the settler test and others.

So I have written now a system that tries to download all current lot owner icons once a day and reloads them from there. If the user does not exist on the local storage, it will still fall back on the Minotar one but still download it for later use. In any case, we rely less on network connections to other servers and this should be a good thing.

Work in progress & the hunt for errors

So some days ago, I tried to get a better grip on errors. Thing is, that normally, when you develop code on a linux box, you do so as a normal user. When something does not work, you need to log in as admin, browse to the folder where the logfiles are, see if you find the appropriate error (if there is one), log back as a normal user, change the code, hope it works, and if it does not, you do the same all over again.

It’s tedious. That’s when you are working on it. When something goes wrong while you are, let’s say, fast asleep, the only chance you have is that your users realize that something goes wrong and post a ticket. You then see the email, log in as admin, look for the error etc.

Important to say that there are a lot of so-called “warnings” and “notices” the system can store if you want which tell you if your code is not 100% written for safety in mind. With 2200 lines of code, I estimate that I have about 200-500 places in the code that create these notices – if I want. 80% of those are not really issues, but how would the system now. The logfile usually only stores the really important errors. The rest just disappears.

So I wanted to get some alerts when something really weird happened and set up an error reporting system that would send me an email when predictable things would go wrong. This would allow me to track errors that I could not quite pin down and send me a lot of information about variables, users and so on at the same time, which would not end up in the log files in the first place.

This worked fine, for 1-2 weeks. I then liked it so much that I used it regularly during writing code, so that I would get an email as a way if the code does what I want. The issue started when I made a mistake when iterating a larger amount of data and the system sent me 800 emails at once. Then, towards the evening, people started complaining that their registration emails would not arrive. I had no idea what happened for 2 days, until on the third day, I remembered that I have a 1000 email quota on the server which has been maxed out and thus also the actual important emails would not be sent anymore.

So I learned finally how to program my own error management system where I can decide what happens with errors instead of having the system write it into a logfile which is annoying to reach. So I had errors written into a database where I can access them from the website, group them by frequency and so see which ones are occuring the most and therefore should be fixed first. That allowed me also to make the system report all the warnings and notices, so that I could better audit the code.

But then I had the idea that I could get something more direct, more like email, but without the quota. I thought about IRC messages, but it’s a bit annoying since the server login etc takes time since the server is not on the local system. So I researched a bit more into instant messaging and found the XMPP protocol (formerly “jabber”), the same as used for google talk or facebook chat

Then I installed a XMPP chat server on the machine, taught the minecraft system how to send messages (that was the hard part) and now I made the system send me instant messages which do not have a quota, arrive instantly, even on my cellphone if I want to, AND I can send myself now all the notices and warnings to properly patch up the code.

So the last 24 hours or so I have been patching a LOT of small stuff in the code, which of course does not go smoothly all the time, but at least the server is code-wise in a much better situation, and getting much better and cleaned up substantially. And if there is an error, I will now about it instantly :-)

On top of that, we can theoretically have users use it. It would be like IRC, but fully locally authenticated, and people could get instant messages on their cellphones when they get an in-game message or their stuff is being sold. Of course this is all just distance future, but still nice as an option to have more feature freak :-)

New Block & Item Directory

I have started to write a new Block & item directory. You can find it in the Money & Trading submenu. I will integrate this with the shop data so we will have a fully circular referenced list of all items, sellers, buyers and transactions eventually. This list will for now help you to find item names. It also contains items and blocks of future versions, since I update the list whenever a weekly build contains new stuff.