Posts by yahwho

A new update is now available, introducing "Points of interest" and many more changes!
Latest hotfix: 0.9 (2025-11-04)

    OK, so I've got a database running that stores a players "friends" list. Using the chat command /add friend PlayerName this gets the players UID with;


    Player p = getServer.getPlayer("playername");


    String friendUID = (String)p.getUID();


    (or something like that!)


    Here comes the perplexing part!


    Now say the players "friend" goes off and destroys their stuff whilst they are not online. When they next login they want to remove the player with something like /remove friend PlayerName now clearly this is only going to be possible *if* the "bad" player is logged in at the same time to enable the server to work out the UID.


    Now, I could execute this with a command such as /remove friend PlayerNameUID (like 28372728294828282) but that's going to be very difficult for a user to do.


    Can anyone think of any magic way to make this easier?


    (I'm half way thinking a GUI is going to be the only way. . .)

    Code
    GuiImage testImg = new GuiImage(0.83F, 0.02F, true, 55.0F, 55.0F, false);
    testImg.setImage(info);
    testImg.setVisible(true);
    testImg.setAlpha(0.5f);
    player.addGuiElement(testImg);

    That's what I've done. I'm trying to add an image to left of the "knife and fork" icon. With those settings looks perfect for 1024x786 soon as I go up to my native 1920x1080 the icon shifts much further to the left away from the food/water icons.



    (trying to make my GUI as unobtrusive as possible)

    hehe I think we both got there are the same time!


    Don't suppose Minotorious you know how to either keep an GuiImage to bottom right of the screen? I've tried but when I change resolutions to test it the image shifts to the left or the right. I'm guessing I need to somehow get the players screen resolution somehow and then move the GuiImage accordingly.



    ( I'm sure others will find my relentless questions useful too ;) )

    Perfect thanks Minotorious! :thumbsup: Hmm actually still struggling.


    Player p = getPlayer(String player); //doesnt work
    Player p = getPlayer(player); //doesnt work


    Player p = getServer().getPlayer(player); // i think this works!

    Hi!


    Here is my method I'm playing with at the moment.


    Code
    @EventMethod
    public void onPlayerCommand(PlayerCommandEvent event) {
    String[] cmd;
    cmd = event.getCommand().split(" ");
    if (cmd.length == 3 && cmd[0].equals("/add") && cmd[1].equals("friend")) {
    String player = cmd[2];
    System.out.println("" + cmd[2]);
    }

    I need to get the players UID from their textual name ( it will then go to a SQL statement ).


    I'm really quite stuck on how to do this? ?(

    I'm still having problems getting server to show after update. X/ I see this at the end of the startup script log



    properties file




    OK this is weird. I had to do this a few times to check I wasn't going mad. I checked that the properties file had the line "server_query_ip=-1" in it, when the server runs, you look back at this file and the line has been removed. :|

    Hi guys!


    Now, before when the username was the ID of a player, a player could say type in a command such as /addfriend [playername] but now it's not unique and can change, so the UID has to be used. Can anyone think of a way to simplify this for users? Asking a user to type in a UID seems like its not going to work in practice. /addfriend [9129138053209236023093] just seems too "unfriendly".


    Any thoughts, ideas guys? I'm a little stumped at the moment. 8|

    Right it appears (as far as I can tell so far) to be that newly generate land is OK.


    The problem seems to be contained within the "original" spawned land where I had originally set Dungeons and Caves to off.


    I had modified the database some time ago to allow new areas to contain Dungeons and caves. Which had worked fine.


    It appears though that since the latest update, the areas where there were originally no caves and dungeons now have caves and dungeons! Which is great, but it seems that this is the process which has caused the holes.

    Hmm problem is Minorotrious is that they appear to be all over the place, and people have already died from falling through them. The server keeps track of people survival time, so those who fall have had their survival time reset to zero already.


    I'm hoping there is a repair script available? (I.e. to automate the F10 repair function but across all chunks?)

    Ahh great I see that does fix the ones I'm looking at.


    Problem is they seem to be all over the place and the server is a survival one so players don't have access to the creative mode option.


    I'm hoping there is some way I can "repair chunk boarders" across the whole database. . .