Does anyone know, without me going off and testing this, if using blueprints require resources? I haven't tried using blueprints you see in non-gm 1 mode.
Posts by yahwho
-
-
I would like to see more "decorative items"
-
I feel like a trendsetter
-
Downloading textures.jar? Are you playing on a multiplayer server with custom textures?
Steam or standalone version?
-
There's a clue to the file location in my screen dump
-
The next update will definitely include mounts, i.e. horse
Reading that just made my day! -
That's OK, thought I might have been doing something wrong or someone might have had a workaround for it.
Really no need to apologise @red51 you're doing some really great work! You have inspired me to start writing code again which I'm enjoying as much as playing the game! I can only guess at the length `todo` list you guys have!
I will assume then (unless you state otherwise) that I can carry on with my GUI coding and that I was not doing it wrong and it will work as intended once the listener is fixed
-
Lol you're welcome.
-
Anyone figured out a workaround for this?
-
You need to use this application: http://sqlitebrowser.org/
Let me see if i can grab a dump for you.
It looks like this once run - simply drag the file definitions.db into it
p.s. if you use a copy file like I have you can't do any damage!
-
OK maybe a friendly programmer might write a plugin for the game
-
If you wanted to I'm sure you could write a plugin to do what you want. The API has player position and view orientation calls.
-
Hehe could not resist.
-
Sorry misread - but doesn't the enter/return key already do this?
-
you do not need that, I do not know if that makes any problems. That's to start plugin events, you have a simple function.
I would use the static fields constant "KEY_R"
otherwise that looks coherent, only line 40 I would take out.
HA! Key constants! Thank you noci! That will make life a lot easier than using integers! Danks!But yes, it does look like it is bugged. Maybe @red51 could confirm this? My GUI plans are all on hold at the moment due to this problem
@noci Why would you take out line 40? Because player.registerKeys(new int[]{19}); is enough? edit: just checked - if you take out player.setListenForKeyInput(true); you dont get any input from keys including the registered key(s).
-
oops think I missed an @EventMethod ill edit. . .
I have also tried changing the PlayerGuiElementClickEvent to onPlayerGuiClickIt's the same behaviour, works fine, but as soon as anyone else disconnects from the server, this is no longer works.
-
OK so I have started again on a GUI to try and work this out using the most minimal of code. I have removed the panels and I am just working on one single label that is set to be clickable.
Here is the complete code for the plugin.
All it does is listen for a key press (R key). When a player presses R it sets the mouse cursor to visible, so we should be able to click on an element.
The element is a single label in the bottom left hand corner of the screen with the text "Test text which should be clickable. . ." (of course this is set to setClickable(true).
Now, when this plugin is run and a player presses the R key the listener onPlayerGuiElementClickEvent is never called whilst clicking on the label?
-
zumindest ist es nicht nur ich
und
"Ich habe einen PlayerDisconnectEvent hinzugefügt und lasse mir player.isListeningForKeyInput() und z.b. player.Attribute.GuiImage.isClickable() für alle Spieler ausgeben, sie sind nach dem Abmelden eines Spielers TRUE. "
I had not thought of that - good idea for testing!
Although I suspect I will have the same problem as you. . .
-
Yeah the + player.getUID was added as I've tried (desperately) to fix the problem (same issue though with or without it).
Casting into a label was just done for personal reasons - ease of reading code! (I know they're all objects and dont need the implicit cast).
Nope I don't use GUIElement.destroy()
And nope again, I don't get any kind of errors at all.
See! A really easy logic bug!
-
Yep there is an onPlayerDisconnectEvent but nothing to do with the GUI in there
Here's an example of how I have done the set attribute
Code
Defo a weird one, it's like the event listeners gets garbage collected when a player disconnects.