Server scripting

I’ve been a good boy, working on server framework stuff all day today, despite it being horribly boring work. I’ll keep you updated on the progress, and if I start to feel frustrated or bored, I’ll work on some client stuff for a while.

I’m designing it to have an open API and to be pluginable, so you will be able to write your own game mods, or automated chat monitors, or whatever else, all in java. The exact API isn’t decided on yet, but it’ll be as easy as putting your class files (either in a jar, or as straight files) in the same dir as the server, then telling it what “mod” to load in the properties file. I’m also thinking about how to chain mods, so you can load several at once, like a chat moderator mod and a spleef game mode mod.

Here’s a rough example of how overriding placing blocks might work:

onBlockPlaced(Player player, int x, int y, int z, Block block) {
   if (block==Block.lava) {
       broadcast(player.getName()+” placed lava, and thus was KILLED!”);
       player.kill();
   } else {
      placeBlock(player, x, y, z, block);
   }
}

Also, I will keep posting personal stuff on here. So nyah. :-P