All users will need to merge their Minecraft Forum account with a new or existing Twitch account starting October 23rd. You can merge your accounts by clicking here. Have questions? Learn more here.
Dismiss
  • 0

    posted a message on Smart Moving

    This mod has a control conflict with the grapple hook mod.


    I've made an issue on grapple hook mod's github repository, just posting here to inform you of the conflict.


    https://github.com/yyon/grapplemod/issues/4


    Edit: The conflict has been fixed.

    Posted in: Minecraft Mods
  • 0

    posted a message on Grappling Hook Mod

    This is a cool mod, I have noticed a few issues though.


    Where would you prefer bug reports, on here or on github?

    Posted in: Minecraft Mods
  • 0

    posted a message on Minecraft::RCON perl package
    Your code seems pretty messy, but that might just be Minecraft forum removing tabs. XD

    Never-the-less, you should try putting it through this: http://perlcritic.com/

    It's a perl module for checking perl for 'bad form' and similar, although some rules are a bit silly (by default, it claims that all regex must have the s flag, because apparently people aren't aware that the '.' metachar matches [^\n], not any character... Although is also says the same for the x flag, for a simple split(/, /, @arr). XD ).

    There are other things I want to poke about your code but I feel mean. Although I feel I should mention it seems rather fruitless to do this:
    my $length;
    ...
    $length = $#data;

    Then use $length three times, especially since it's probably quicker to type $#data.


    Finally, this isn't the 60's or 70's, you don't have to squeeze it into 10kb, get some whitespace and readability in there! XD


    Now I'll say sorry for scrutinizing. XD
    Posted in: Minecraft Tools
  • 0

    posted a message on Minecraft::RCON perl package
    Unless you parse for commands every 30 seconds or so, I don't think FTP will cut it.

    Course, these days you can get a VPS for not much more than a host plan for Minecraft and get full control+ability to do other stuff (linking a minecraft control script using this module+POE::Component::IRC for a Minecraft/IRC bot is something I figured would be cool).
    Posted in: Minecraft Tools
  • 0

    posted a message on Minecraft::RCON perl package
    n00berNZ, you should:
    use warnings;

    Unless you're such a badass perlmonger you don't need such things.

    As for the for the actual issue, this is because messages from the server (such as chat) aren't sent to the remote console. Given how the server is annoying and doesn't work well piping STDOUT (it spams >) I guess you could try tailing/piping/otherwise reading the server.log for what you want.

    Alternatively, you could just edit the server to send chat over the console for custom commands or automatic moderation or whatever you fancy.

    Of course, I haven't touched a server in months, so this could of changed now and I could be completely wrong.
    Posted in: Minecraft Tools
  • 0

    posted a message on Minecraft Server Auto-Manager - Actually useful now!
    Updated! Yay!

    * Removed a lot of the bad, smelly, unchecked sys calls in favour of perl functions
    * Changed the downloading directory from tmp to mcam (made more sense).
    * Made a configuration file so updates are easier to do
    * Added support for servers other than craftbukkit (config)
    * Added support for downloading plugins from dev.bukkit.org (some may not work, if you report it I'll try fix it)
    * Added auto restart feature (off by default)
    * Added toggles for disabling watch and auto-update (on by default)
    * Fixed some bugs, probably
    * Better logging, including time stamps
    Posted in: Minecraft Tools
  • 0

    posted a message on Minecraft::RCON perl package
    Quote from DemmyDemon



    Except for some completely unchecked system() calls that made me cringe out of snobbery more than anything, I have no issues with this at all.
    Personally I would have used perl functionality rather than using system("wget"), and I'd certainly be checking return values if I did use system(), but that is probably tainted by slight paranoia on my part.

    I figured that'd be a big one, ha. I know it's better to use perl functions, but currently it's a bit quick andirty... My goal was to get it running because it was distracting me from work... XD


    Notifying the admin via e-mail is easy when you know how. A properly configured system already has some resemblence of sendmail support, which there are about a zillion perl modules for. No need to manually SMTP that. For example, MailTools contains the excellent Mail::Send.
    I'm aware there are a bunch of perl modules for SMTP, I tried a few but I didn't really look into it in great detail and decided to procrastinate getting it done in favour of getting the basic stuff going. XD

    I need to look at it in detail.

    Using Bukkit, plugins with variable paths should not be so hard either, as you can get RSS streams from DBO with recent files, based off plugin name. I can't think of the URL off the top of my head, but AFAIK it's pretty well documented if you search the forums over in the bukkit camp.
    Of course, you might need to handle .zip with .jar inside it, and differentiate those from the .jar files themselves, depending on the plugin.
    Thankfully, CPAN has modules for handling zip files, for example Archive::Zip.

    I didn't know bukkit had an RSS stream for that, my current method is pretty easy to change, just need to replace "lockette" with $plugin (or whatever the variable is) in the appropriate places, although in general I dislike my current method, easy to break on something like a "[" in an url for some reason, or if Bukkit change their page layout.

    Oh, and I've been inspired by your script, so I'm thinking about making more Minecraft::Stuff for CPAN now. Any requests?
    Perhaps Minecraft::Config that parses and returns minecraft server configuration (server.properties)? Handy in conjunction with Minecraft::RCON so you can just give the server directory and it'll figure out rcon.password (and friends) on it's own :-D

    Yes, I haven't really found a good reason to use perl outside of quick scripts for work, or playing on my Raspberry Pi. It'd be nice to make a bunch of Minecraft modules or bits of script to use for various things. Would help me with a bit more smarts too when it comes to perl. XD

    Your config idea intrigues me though, tying the two together, you could make it so you could set any server.properties option from in game using that and RCON (and maybe some hack with STDIN from server.log). Perhaps we should talk some. :)
    Posted in: Minecraft Tools
  • 0

    posted a message on Minecraft Server Auto-Manager - Actually useful now!
    I stumbled upon a perl CPAN package, written by Fredrik Vold called Minecraft::RCON, using this lovely package I've written a script for server admins to easily manage the boring and possibly annoying basic aspects of server management.

    Features
    Watch
    Watch does just that, it watches the server. If the server crashes it restarts it for you, if the server crashes during the restart then the script exits, instead of continually trying and potentially damaging something on your server (like your save).
    Eventually, when I figure out how to do it relatively easily, you'll be able to get notifications that the server has crashed and, if it happens, has got something really wrong with it.
    The script will check for server status every 30 seconds by default, but this can be changed by changing the value updateInt in mcam/mcam.props

    Auto-update
    This does, just that as well. Auto-update works for vanilla minecraft and bukkit (including plugins on http://dev.bukkit.org). To tell the script what server to use, and what plugins to update just edit the values in mcam.props respectively. If you use vanilla with mods (as in you mod minecraft_server.jar) then it's probably wise to turn the auto-update feature off.

    The script will check for any updates every 86400 seconds (a day) by default, using a mirror http method which'll download only newer versions of the file. If it downloads a newer version, it sets a shutdown timer (default 2.5 minutes), notifies people on the server and then shuts down after that time and restarts.

    Auto-restart
    By default this feature is off. But if you want to use it, just set set restartInt in mcam.props to a positive integer. This is how often (in seconds) the server will restart. Use any value below 1 to turn this feature off in the config.

    Note: A warning will only be sent before the save is done on auto-restart, so you should mention elsewhere that your server automatically restarts every x seconds.

    Using it
    To actually use this script, you'll need a few things
    * A brain (no jokes, you'll actually need to use it)
    * SSH access to your server
    * Perl, with a few modules:
    ** IO::Socket::INET (standard dist)
    ** Minecraft::RCON (CPAN)
    ** Time::HiRes (standard dist)
    ** LWP::Simple (CPAN)
    ** File::Path (unsure)^
    ** File::Copy (unsure)^
    ** File::stat (unsure)^
    * Some simple configuration stuff
    * A linux OS?? (I've only tested this script on Ubuntu 10.04, it may work on Win/Mac)

    ^ - I'm unsure because I've got a lot of modules installed and didn't bother to look them up.

    First use & Configuration
    I haven't tested placing the script in another directory other than that with your server jar, but it should work okay if it's not.

    Before you can use the script, there are a few things you need to define/set.
    In your server.properties:
    * rcon (enable-rcon) must be true.
    * rcon.password must set.
    * rcon.port must be set to a free port, there's no need to port forward

    On the first run, it'll create a directory in it's current working directory called "mcam", this directory will contain a config file after the script is run and will be home for downloaded files for the updater.

    The configuration file created will need editing before you can run the script again.
    In mcam/mcam.props you must set 'dir' and 'rconpass', by default the rcon port will be 25566, this'll need changing if you changed it in your server properties.

    By default, the server it'll run is craftbukkit, you can change this in the config.

    I suggest, for the first couple of runs while you configure things, you run it directly in the console as a foreground process, if something goes wrong it'll be printed.

    The configuration file is commented fairly well, so most of the setup should be trivial.

    After the first run, use a simple bash script to run it under nohup (don't use screen, there's no need to).

    I suggest redirecting stdout and stderr to somewhere, instead of it just going to nohup.out or /dev/null. The script doesn't use stdin, so there's no need to redirect it anywhere.

    nohup ./mc-automan.pl > stdout.log 2> stderr.log &
    should suffice.


    The script is, I feel, fairly well commented for those with some basic linux/perl knowledge. So understanding what does what should be fairly trivial.

    Copyright and other information you should know for legal purposes or otherwise
    Credit to Fredrik Vold for Minecraft::RCON, which without this script wouldn't exist. Forum post for this: http://www.minecraftforum.net/topic/1359023-minecraftrcon-perl-package/

    For specifics, see the script, but to sum up
    This script is provided 'as-is', if it breaks something, the writer(s) or contributor(s) are not at fault.
    I do not claim any copyright, however if you use this script, it'd be nice to give credit where credit is due. This means you are free to use/edit/distribute it, but please don't pass it off as your own work (that's just not cricket).

    Otherwise, terms laid out for Minecraft::RCON (specifically, those relating to usage of 'Minecraft' and those relating to Mojang AB).

    Any bugs/suggestions/additions can be emailed to [email protected], preferrably with a suitable subject (such as MC Auto-Manager suggestion), or posted on here, this forum topic.
    This code checks out against Perl::Critic at http://perlcritic.com/ for stern severity level, with some minor warnings at harsh.

    Download
    You can download the script from: http://dl.dropbox.com/u/14141289/mc/mc-automan.pl
    Posted in: Minecraft Tools
  • 0

    posted a message on Can a Raspberry Pi Run bukkit?
    I'd just like to add a few things.

    Firstly, use Debian/Raspbian (if using a RPi) over Ubuntu. Ubuntu won't even run on a RPi (cpu doesn't meet requirement), but on top of that, Ubuntu is filled with a lot of bulky things to make it more 'user-friendly', which comes at the cost of speed. Raspbian is the Debian fork specifically for Raspberry Pi, so it's relatively safe to assume that it includes optimizations for the hardware.

    As for actually running the server on the Raspberry Pi, there is one, big, big, big pro you missed out: shell access. With the right knowledge you can create additional little tools to help run your server, like a watch script to automatically restart it it crashes to viewing logs on a webserver. You've also missed out that apart for the initial cost of buying the RPi (35 USD for B board + maybe 10-15 depending on what else you get), the periodic cost is running it, which as I understand is less than one hamburger for a year.

    The other thing you could try... Is get two, or four Raspberry Pis, link them together as a mini-super computer, you've suddenly got 1-2GB RAM and 2-4 800MHz CPUs. I'm not sure on stability, or how well this'd work with Minecraft, but it could prove interesting. Someone at a university in England recently made a mini-super computer with 64 Raspberry Pi's in a lego enclosure, google should help you on that front.


    PS: SD card speeds may be slow, but you only need the SD card for boot, nothing stops you from mounting a HDD and using that for your server.

    PPS/Edit: If you wanted to run a server on a RPi, you might be better to use vanilla server, rather than Bukkit. I don't know if Bukkit implements much for conversing system resources though.
    Posted in: Minecraft: Pi Edition
  • 0

    posted a message on Minecraft::RCON perl package
    Okay! I'm done... I hope... I think.... Well... Only one way to find out!You can download it from http://dl.dropbox.com/u/14141289/mc/mc-automan.pl.

    It needs some more work, but the basic functionality should be there, I suggest running it for the first time directly, then using a simple bash script to start the script in nohup (no need for screen). I've written it specifically for me (bukkit+mcMMO+Lockette), for now, but it's not hard to add an extra plugin if you know some basic perl/have a brain, I need to figure out a good way of easily dealing with plugins and stuff.

    Thank you DemmyDemon for the awesome module which let me do this. I would appreciate it if you read over the script, as most of my perl experience has been quick scripts just to change a bunch of stuff in a file, or simple IRC bots, nothing quite so 'critical' as maintaining a minecraft server...

    Otherwise, I guess I should post about this somewhere for people to use.


    EDIT:
    Posted topic: http://www.minecraftforum.net/topic/1671399-minecraft-server-auto-manager/

    I feel there is lots that could be done with this, and could be an interesting learning experience... As long as I have someone to push me to do it/develop it with. XD
    Posted in: Minecraft Tools
  • 0

    posted a message on Minecraft::RCON perl package
    Quote from DemmyDemon
    That's the whole intent of releasing a module on CPAN ;-)

    Well, yeah... XD

    I'm basically done... Just need to test/debug a few things, although the amount of hack in this currently is pretty high... Once it *works*, though, it's easier to rewrite bits of it be less hacky and more usable.


    One thing I noticed, but didn't really test is that if you call disconnect, and then connect, without recreating the Minecraft:RCON object, it complains that the password is wrong. I had this crop up and then just found a work around without actually testing it any further. XD
    Posted in: Minecraft Tools
  • 0

    posted a message on Minecraft::RCON perl package
    This is, really rather awesome. I just stumbled upon it when I was looking for an old perl script I found for interacting with RCON.

    Now using this to write a script for myself to basically make my bukkit server maintenance free (automatic crash restart and updating, maybe some other fancy stuff if I get around to it.).

    I'll be commenting lots, and uploading once I'm done for people to use... If you don't mind me using your perl module in such a fashion that is, DemmyDemon.

    Thanks for the awesome module!


    Btw, I'm doing this for linux servers (Lucid is what I'm running, specifically , but it should be fairly trivial to port to whatever, just need to change the system functions I've used).
    Posted in: Minecraft Tools
  • 0

    posted a message on IF You Could Update and Submit Your Own Minecraft update What will You Introduce

    MineCraft 1.631_312
    + Redstone power generators added.

    How would this be any different to a Redstone torch?
    Posted in: Discussion
  • 0

    posted a message on Minecraft's Terms Of Use
    Quote from Trentc98

    I would like to point out that later in the Terms of use it says


    I would like to point out that that what you posted contradicts this:
    Do not distribute anything we've made. This includes, but not limited to, the client or the server software for the game. This also includes modified versions of anything we've made.


    Which is my reasoning behind saying this:
    Quote from JeffBobbo

    Well... If you read later... it contradicts itself.

    Generally, I don't think contradiction in ToS or similar agreements go down well when facing court cases. :)



    PS: Minecraft forums are annoying. >.<'>
    Posted in: Discussion
  • 0

    posted a message on Minecraft's Terms Of Use
    String_Auer: See the example I gave in the OP. "Making Redstone not pop when water hits it" surely that is editing Minecraft's stock files. :)
    Posted in: Discussion
  • To post a comment, please or register a new account.