
In Soviet Minecraft, server op you - Mithaldu
http://rjbs.manxome.org/rubric/entry/2066
======
Kequc
I'm certain this is an unpopular opinion I see Minecraft as an incredibly
buggy mess. Not for it being unfun, because it is, a lot of fun but for years
this game has been plagued with a litany of problems.

[Edit: Maybe it isn't an incredibly unpopular opinion I'm just used to people
who play games try to cut you when you critique.]

Shortly before horses were added I thought something was going to be done to
help the finer OCD-minded fans in the community like me. After horses were
added I realised that was not going to happen.

For example a bug cropped up that would lose a 'tick' of redstone power once
per transfer down a circuit. Only if the pulse was shorter than three 'ticks'
long. Making anything requiring use of a precision circuit impossible. That as
far as I know was never actually fixed.

Microsoft own the property I'd like to see them have a go at remaking it. I'm
absolutely positive there will always be holdouts over the original. But
Minecraft by itself doesn't seem like it would be all that complicated a game
to remake.

I'd play it.

~~~
TillE
Dwarf Fortress and Minecraft are both incredible, complex games made by one
mediocre programmer (not commenting on the Mojang team, just Notch himself).
It's frustrating, but it should also serve as an inspiration to any small,
talented team that wants to go even further.

~~~
rmc
It's another example of Worse is Better

~~~
tedunangst
I think that's a rather severe misinterpretation of Worse is Better. Worse is
Better doesn't mean ship with silly bugs and never fix them; it means ship
simple, understandable systems. The canonical example is that unix system
calls sometimes need to be restarted instead of always succeeding. But that
doesn't mean unix succeeded because its system calls would randomly return
incorrect data.

------
themoogle
There is a much simpler reliable way to do this...

Run a bungeecord proxy server
[http://www.spigotmc.org/threads/1-7-2-1-8-bungeecord.392/](http://www.spigotmc.org/threads/1-7-2-1-8-bungeecord.392/)

Then you can link the servers together with signs and customizable nether
portals.

I have been running servers like this for a while now.

And Craftbukkit isn't dead, [http://www.spigotmc.org/threads/bukkit-
craftbukkit-spigot-1-...](http://www.spigotmc.org/threads/bukkit-craftbukkit-
spigot-1-8.36598/)

You can get the latest code from the devs at spigot without the DMCAed code,
everything was rewritten, patched for 1.8 and is now has a legal way to
distribute the files. (You compile them yourself)

~~~
Orangeair
+1 for this. I actually just set up similar myself yesterday. Once you look at
a few tutorials and figure out how to muck around with all the yaml config
files, it's really pretty easy to configure bungeecord. The isolation you get
from being in completely separate worlds is definitely an added bonus. You can
do cool things like create worlds that are entirely devoted to a minigame, for
instance, if you want to have that. It also makes it really easy to just
create one hub world that players can teleport from, and return to easily. I
used a really simple plugin called FancyPortals[0] to achieve that. There are
a couple potential problems you may face, the biggest one being memory
requirements (since you would actually be running n servers instead of just
one). If that's the case, you could also check out MultiVerse[1], which is a
bit easier on memory I believe.

If nothing else, you should at least consider switching over to Spigot[2] (A
high performance fork of Bukkit). They've had some DMCA problems, so you have
to compile the .jar yourself, but there's a script which automates the entire
process, so that's really no big deal. Plus they just updated to 1.8
yesterday! Once you have Spigot, you can use any Bukkit plugin. Plugins exist
that do everything you're trying to do, and more, but with the added bonus of
actually being integrated into the game. The big one to check out would be
Essentials[3], which contains dozen of simple commands for doing lots of
common, neat things.

[0] [http://dev.bukkit.org/bukkit-
plugins/fancyportals/](http://dev.bukkit.org/bukkit-plugins/fancyportals/)

[1] [http://dev.bukkit.org/bukkit-plugins/multiverse-
core/](http://dev.bukkit.org/bukkit-plugins/multiverse-core/)

[2] [http://www.spigotmc.org/threads/bukkit-craftbukkit-
spigot-1-...](http://www.spigotmc.org/threads/bukkit-craftbukkit-
spigot-1-8.36598/)

[3] [http://dev.bukkit.org/bukkit-
plugins/essentials/](http://dev.bukkit.org/bukkit-plugins/essentials/)

------
_jomo
This is a really interesting hack. I have done a similar thing by runnig
minecraft in tmux, tail -f | grep for something in the log file and then
sending commands back to tmux.

However, all these problems in the article can be solved with a few essential
bukkit Plugins. Bukkit has been DMCA'd by one oft their own developers,
probably because it became clear that Mojang (the company developing
Minecraft) owns the rights over Bukkit. A popular fork of Bukkit, "Spigot" [0]
has continued development and published patches until they stripped all of the
contributions of the DMCA issuer. They published Spigot for Minecraft 1.8 on
Friday.

[0] [http://www.spigotmc.org/](http://www.spigotmc.org/)

Edit: typos

~~~
hyp0

      tail -f log | grep keyword | while read line; do tmux send-keys -t 1:1.0 "$line"; done
    

Really cool idea! But grep awaits EOF to pipe its result... (though it outputs
line-by-line if result is not piped onward)

How are you getting it to work? I found a _\--line-buffered_ option for GNU
grep, but I'm using busybox grep...

 _EDIT_ OK, in case anyone else wants to know, found I could solve it by
putting the grep inside the while loop instead ( _line=`echo $line | grep
keyword`_ ), but I'd still like to hear how you did it... BTW: entering "-"
causes send-keys interprets it as an option.. I pr need some data cleansing...

~~~
sp332
Maybe you can fix your '-' problem by putting '\--' (like a blank option) in
front of it. This tells send-keys not to interpret anything after the -- as an
option.

~~~
hyp0
Good idea, thanks, I know that idiom but didn't think of it. Interestingly,
it's not in the tmux manpage, but I just tried it and it works. Cool!

------
pjungwir
Line-oriented text-based interfaces strike again!

I haven't used Perl in years, but I'd like to know why the POE approach is
groty. I'd prefer writing the thing in Perl than Expect.

As a dad waiting eagerly for his son to be old enough to play Minecraft, I'd
much rather run an unmodded server, so this approach is very appealing to me.
I've been disappointed that almost every pre-release for 1.8 had nothing but
server commands, but if it means I can drive a Minecraft server without mods I
see more value to that effort.

I'm curious if the Dominus mentioned in the article is mjd. I saw him speak
once on how git was a greater accomplishment for Linus than Linux. At 37 years
old, I'm trying to find a path forward in my career that lets me keep growing
as a programmer. It's encouraging to see these hackers who have stayed with
their craft all these years and are still churning out cool solutions.

~~~
rjbs
POE is (in my opinion) a bit grottier than some other solutions might have
been, but certainly not on the "shrieking horror" level of Expect. ;) There
are many different sugar layers built atop POE, but I'm now using MooseX::POE,
which is nice. It's not a disgusting pile of hacks, unless you think that
everything in Perl is that, in which case... y'know.

For example, IO::Async lets you do your work with futures, which are a very
nice abstraction that people from many other languages are used to. You can do
that in POE, but it's not the default way. POE also has, sometimes, weird
choices of jargon for stuff. I know POE better, though, and my goal was to get
it done, rather than learn a new framework or build something to last the
ages. I mean, the kid might stop being interested in Minecraft at any second,
right?

And yes, it was mjd.

------
dola
I used to work on a Minecraft Server Tunnel which extended the idea of only
using the console by also tunneling all network traffic. By inspecting packets
it knew about things like player positions or block interactions which were
used to allow players to have their own private chests or protected areas.

It is fairly outdated now but was a very interesting project.
[https://github.com/SimpleServer/SimpleServer/](https://github.com/SimpleServer/SimpleServer/)

~~~
GICodeWarrior
I was hoping someone would post this. Too bad it hasn't been updated recently,
but it had a good run.

------
kordless
I've been noodling around with Minecraft servers because it was the original
idea behind what I'm now working on at StackMonkey. Messing around with the
deployment for these servers[1] has helped me refine the business models a bit
to make them more manageable. As a result, we'll have self-hosted managed-
software-as-a-service deployments within a month or so.

The demo server for Minecraft on the site[2] launches a server with
ScriptCraft installed, which allows you to run JavaScript executables that
execute actions in game. For example, you can build a sphere of TNT boxes with
a very short JS comman. The intent behind this is to be able to bring the
Bitcoin payment addresses for the server(s) in game where they can be managed
by others. I'm working on getting qrcode.js running in game so I can build
payment codes out of blocks. I'll also need to figure out a way to show the
time left on the server.

Now that I've read the post, I'm wondering how valuable adding the ability to
op someone based on Bitcoin payments would be? It seems there needs to be a
decent auth mechanism for this that can be quickly hooked up to the server. If
the author's daughter wanted to 'op' herself, she simply sends in a very small
amount of Bitcoin to the server. If the daughter's friend wanted to do it and
was on with others, then they'd need to send in more to prove they weren't a
bad actor. Maybe 10 cents or so.

This is all related to enabling managing you software remotely on someone's
cloud as if it were a public cloud. Enabling permissions for lower level users
for high level functionality will surely be something we have to tackle.

[1]
[https://gist.github.com/kordless/beba0a6fa8edcda3b15a](https://gist.github.com/kordless/beba0a6fa8edcda3b15a)
[2]
[https://www.stackmonkey.com/demo/minecraft/](https://www.stackmonkey.com/demo/minecraft/)

------
nightpool
Yep along with Spigot, as mentioned by _jomo, there's also a new project
called Sponge that is replacing CraftBukkit from the ground up, building on
top of Minecraft Forge (a modloader) rather then as a standalone mod like
CraftBukkit/Spigot. Its still in pre-alpha though, and there are a LOT of
things unimplemented, compared to Spigot which is a fork of Bukkit.

Another popular option is Glowstone, which is an open source implementation of
the _entire_ minecraft server, rather then a mod. Glowstone already supports
plugins written for the Bukkit API (separate from the CraftBukkit
implementation that got DMCA'd) and there are plans to support the Sponge API
when its more mature. I can't speak to its stability/completeness though. It
looks like there isn't any redstone or physics yet? That shouldn't be a huge
deal for most creative servers, but YMMV.

------
mholt
The things you do for your kids.

------
lifthrasiir
The bot part sounds quite similar to what I've done with my server:
[https://github.com/lifthrasiir/mcbot](https://github.com/lifthrasiir/mcbot) .
It opens two 0MQ sockets corresponding to the stdin and stdout of the java
process and operates an IRC bot using them. 0MQ did have an advantage of not
having to stop the server to update the bot.

------
adrusi
Huh, I used a similar approach several years ago running a Minecraft server
for some friends on an old laptop as a child process of a nodejs monitor that
had commands for changing time, getting certain items for free, etc.
Eventually just migrated to craftbukkit because of demand for specific
plugins. It turned out that the monitor process worked a lot better.

------
isaacdl
I want a dad like you.

~~~
rjbs
Thanks! Can you promise to care for me in my old age?

------
comrh
Being a Minecraft admin is super fun, like a D&D dungeon master.

------
jimmaswell
>There's no command to get a player's location

You can see it on the debug overlay. One of the F keys.

Also, I'd recommend running the server inside screen so you can get back to it
from ssh

~~~
0942v8653
It's F3, but that wouldn't have worked, because he needed a message to be
logged (otherwise they'd have to type the coordinates in).

------
tete
Slightly OT: That code makes me miss Perl. Working, nice looking, easily
understandable, object oriented, async code.

[https://github.com/rjbs/Soviet-
Minecraft/blob/master/lib/Sov...](https://github.com/rjbs/Soviet-
Minecraft/blob/master/lib/Soviet/Minecraft.pm)

