Posts by james1bow

A new update is now available, introducing fishing, climbing gear, clothes and more!
Latest hotfix: 0.8.5.1 (2025-04-29)

    THIS PLUGIN IS JUST FOR FUN!!!! YOU CAN USE IT ON YOUR SERVER BUT I WOULD NOT!!!

    was bored so made a small gravity plugin.


    /gravity default sets your gravity

    /gravity VALUE value has to be a float (-5.0f) default gravity is -9.81f.

    /gravity all default sets all players on the server gravity to default

    /gravity all VALUE sets all players on the server gravity


    entering other commands that start with /gravity can/will cause an error!


    again just for fun i would only use on single player worlds!


    ps.

    if you dare enter /gravity 999.99f.

    Files

    • gravity.zip

      (2.01 kB, downloaded 174 times, last: )

    A mail plugin!


    to install:

    extract the zip file to your plugins folder!


    updates:

    1.1 fixed issue with data base not being created.


    to use:

    type /Mail Box to open the ui.

    type /Mail playerlist for a player list in chat.

    type /Mail help for help


    players can also email themselves (for saving coords and such)




    Youtube video here!



    future plans:

    ability to attach a single item to the mail.

    add a place-able mail box to check for letter/packages.

    new mail notification

    admin mail all function



    Files

    • WTGMailV1.1.zip

      (17.99 kB, downloaded 626 times, last: )

    is the Server.getAllAreas() not working? i beleive my code is correct but keep getting a null for start position.


    Java
    public void showareas(Player player){
    Area areas[] = Server.getAllAreas();
    for (Area area : areas) {
    Area newa = new Area(area.getStartPosition(),area.getEndPosition());
    Area3D toshow = new Area3D(newa);
    player.addGameObject(toshow);
    }
    }

    However, this is a big area (as many players areas are on his servers) and so far I've only been able to make 6 claims, which only cover one full house, part of another house and a farm plot. With the points going up each time (think its now 120 to the next claim) this is going to take a very long time.

    i believe yahgiggle mentioned adding a way for admins to give points in the future. for the time being the owner of the server can download db browser for sqlite. open the database in write mode(database.db in the plugin/worldname folder) and go to the points table and add points to the points column. then file/write changes. but, i cannot stress this enough backup the database first!

    As an example, let's take the plugins for the Rust game: in it, the plugins for teleporting home and teleporting to a saved point use different commands without a prefix. And the data about the author of the plugin is registered inside the plugin. Extra prefixes deprive of convenience when using the plugin.


    I do not think that the /sethome and /home commands will be used by other plugins that do not relate to teleport.

    using a prefix is the way to go. when a /command is used it triggers an onplayercommand method for all plugins. i ran into an issue where it was reading from the database from 2 of my plugins for every command entered. a simple fix was to add a prefix. so something like this:


    Java
    //plugin 1
    if (cmd[0].equalsIgnoreCase("/this")){
    get that database connection.
    } if (cmd[1].equalsIgnoreCase("database")){
    do something with this database
    }else{return;}
    }else{ return;}
    Java
    //plugin 2
    if (cmd[0].equalsIgnoreCase("/that")){
    get that database connection.
    } if (cmd[1].equalsIgnoreCase("database")){
            do something with that database
            }else{return;}
    }else{ return;}

    in my case it was just getting a database connection for both plugins. but if your doing something more complex you can cause errors in other plugins.

    with the above code it prevents any errors that may happening.

    also with the api being new there is alot of development going on, the odds of having multiple plugins using similar commands is quit high. in my case there will be a /sethome player position, /sethome area, and /sethome area npc so my prefix's will be /npc, /player, /Area fallowed by the sethome.

    Tested it in single play...I like it a lot... :love:


    would it be possible for the menu to open as soon as you enter a portal?

    What would be optimal if this is a restricted menu that only offers the travel options ...

    for the owner of the portal possibly with a cancel button so that he can then edit the portal with "U" (the complete menu). :thinking:

    the menu auto open is possible but it would have to check vector position every time the player moves then compare this to the database. single player this would be fine, but if you had 20 ppl running around a server you would run into database locked issue as you can only have one connection at a time to an SQLite database. i will be redoing the plugin once the api gets an update.

    A small weather hud. displays current temp(not working, i guessing api limitation.), current weather and next weather.



    To Install:

    extract WTGWeatherHud to your plugins folder.


    Commands:

    /Weather help to display help

    /Weather Hide to hide the hud

    /Weather Show to show the hud


    Future plans:

    config file to set update time and hud position.


    To update:

    extract WTGWeatherHud to the existing plugin folder.


    Update 1.2:

    fixed bug (command's triggered sqlite connection for WTGTimeHud).




    A small plugin that adds a year, day ,month and time of the server. updates every 5 seconds.


    Install:

    extract the WTGTimeHud.zip to your plugins folder


    commands:

    /Time Help for help file

    /Time Show to show hud

    /Time Hide to hide hud


    Future plans:

    config file to set update time and hud position.



    To update:

    extract the file WTGTimeHud.jar to the existing plugin folder.


    Update V1.2

    changed hud position(was over chat).


    Update V1.3

    fixed bug (command's triggered sqlite connection for WTGWeatherHud).

    kinda the same issue here





    always returns a null.

    but i receive this in the console after i get the null error in console


    Code
    [19:56:40] UPDATE QUICKSLOT 2: corncob (604), tex: 0, stack: 4, status: 0, value: 0, durability: -1, modifier: Normal

    not sure if inventory methods are implemented or if there is another issue!

    im wanting to do a pets plugin at some point and would like to keep them small. anyway we can get an npcTransform cancel-able ?