Posts by Minotorious

    The definitions.db is found in one of the .jar files can't remember which one atm, think it was the commons.jar


    To make it easier i would use the one from your client found in the steam folder if you use the steam version


    To access the definitions.db you need to open the .jar file with winrar or winzip or equivalent and extract it out of it

    The next update will definitely include mounts, i.e. horse, camel, etc. not sure about the exact animals as there hasn't been an official announcement yet.


    Then probably some way to craft the mounts, saddles, etc. (maybe by capturing a free animal and putting a saddle on it? no exact information yet again)


    And finaly most likely some more clothing items, accessories, etc. but the main thing will be mounts not the extra small stuff. Also bugfixes as always :D

    The attributes don't really need to be unique between players, they just need to be unique between plugins (e.g. if one plugin sets a string attribute named Job and another plugin names an int attribute named Job again they will probably crash each other), but that shouldn't be your problem anyway.


    Why are you casting the GuiLabel into an object in the setAttribute() method? imo there is no need for that, but again don't think that is your problem either.


    Do you at any point in your code use the GUIElement .destroy() method?
    Do you by any chance get any errors when other people try to use the plugin GUI after someone has disconnected?

    If you have a panel with a lot of labels unfortunately each of the labels and the panel separately would need to be added to separate attributes and then all added one at a time to the player's screen. Child - Parent relations are not adhered when adding elements in the RW GUI system. i.e. if I add the parent the children do not get automatically added!

    yes you can use your existing world. Before starting the server you will have to copy your world to the server's Worlds directory and then change the "server_world_name=Your_World's_Name" in the server.properties file

    A block is 0.5m, a beam fully extended is 6 blocks long thus 3m.


    The average human walking speed is approximately 6km/hour


    1m is about 3ft


    The player model is about 1.7-1.8m tall


    A door is 4 blocks high thus 2m

    I *think* it may be possible to do what I'm asking with direct database writes to the main world database ( x1000 ) . . . but that will require a LOT of work and LOT of testing on a none-live server before I would even consider adding it to a live world.

    I don't think it is possible, I have tried for instance to turn a furnace on by a direct database edit but it didn't work because the server is using a cached version of the database when online and saves to the actual database every few seconds, thus doesn't read my change on the fly

    you could set up permission groups with an automatic ranking system (e.g. my ServerTools plugin has one included, or I could send you the code to implement one in your own plugin if you don't want to use a separate one) so that they get to a permission group after having spent some time on the server.


    Then the permission group they get to will have in it deny: -* (means all), then allow: -spawnnpc (to give them access to this command only)


    Unfortunately this way you cannot limit the number of NPCs per player.


    Tbh I would like to have console access or at least all the console commands available through the API too.


    I would also like to see a way to obtain for instance the current setr, setl, setp, rotation, etc. settings of a player or maybe have an event e.g. creativeSettingChangeEvent called when a player changes one of those setting with an event.getChangeType() kind of flag to see which of the settings was changed because having a setrChangeEvent, setlChangeEvent, setpChangeEvent, rotationChangeEvent sounds a bit silly to me XD

    sorry for the long delay but I didn't have any time in the past few days, so yes your problem is basically that you are using the same label for all players.


    The way I (and a few others) have handled this is by giving every player their own GUI. That can be done by assigning every player an attribute containing their personal GUI upon spawning (onSpawnEvent, I would recommend not using the onConnectEvent because sometimes the players are not registering correctly in that one since they are not really in the server yet). Make sure the attribute really has a very unique name to not clash with other plugins ;)


    Something like this:

    Java
    @EventMethod
    public void onPlayerSpawn(PlayerSpawnEvent event){
    Player player = event.getPlayer();
    GuiLabel AreaNameLabel = CreateAreaNameGUI("Default Area");
    player.setAttribute("MinoLabel", AreaNameLabel);
    player.addGuiElement(AreaNameLabel);
    }

    Where my CreateAreaNameGUI method is:

    Java
    public GuiLabel CreateAreaNameGUI(String AreaName){
    GuiLabel AreaNameLabel = new GuiLabel(AreaName,0.05f,0.05f,true);
    AreaNameLabel.setPivot(PivotPosition.BottomLeft);
    AreaNameLabel.setFont(Font.Default);
    AreaNameLabel.setFontColor(1.0f, 1.0f, 1.0f, 1.0f);
    AreaNameLabel.setColor(0.0f, 0.0f, 0.0f, 0.6f);
    AreaNameLabel.setFontSize(18);
    return AreaNameLabel;
    }

    Then to get the attribute from every player when they want to use their GUI you need something like this (i.e. casting the attribute to the correct object type else it won't know what object to create):


    Java
    GuiLabel label = (GuiLabel) player.getAttribute("MinoLabel");