Basically your approach is correct. However, unfortunately the "PlayerRespawnEvent" is called before the inventory of the player is changed (i.e. set back to the spawn inventory), so any changes you've done to the inventory will be overridden...
We will add a new "setKeepInventory()" setting to the respawn event with the next update, so if you call it and set it to true, the player will keep his inventory (so you can change the inventory within the event) ![]()
Posts by red51
A new update is now available, introducing "Points of interest" and many more changes!
Latest hotfix: 0.9 (2025-11-05)
Latest hotfix: 0.9 (2025-11-05)
-
-
CPU: [GenuineIntel, Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz, 6, 12] (Cores: 12)
Mainboard: [ASUSTeK COMPUTER INC., ROG MAXIMUS X HERO (WI-FI AC)]
GraphicsAdapter: [NVIDIA, NVIDIA GeForce GTX 1080 Ti]
Total Systemmemory: 34285 MB


-
These severs are running on different machines, on different subnets but with same external IP.
Well, Steam suffers from a bug that the Steam server always uses the external IP for queries (instead of the actual IP the server is bound to), but we implemented a workaround for this so this shouldn't be a problem here (it only causes the server to vanish from the server list in the Steam client from time to time). Just make sure that mp_use_steam_masterlist in the config.properties file (in your game directory) is set to false

The server also disappears if your client cannot query it within 2000ms... so if either the client or the server is too busy and the client gets no response from the server within 2 seconds, the server will not show up in the list.
-
The "Adress already in use: bind" error indicates that there is already another process running on the server port (or more precisely, on one of the server ports, i.e. range serverport-1 to serverport+4 TCP and UDP). Only a single process can bind to a particular port, so it's important that no other process is already bound to one of the server ports. Maybe an old instance of the server is still running in the background? Rebooting the machine should do the trick then. If it's a managed gameserver, only the server hoster can help you about this issue

-
This sounds very promising
Of course you can release the utility, the old RCON tool is pretty limited anyway so it's definitely good to see an improved version of it 
-
Is there maybe something in the logs about "Steam losing connection" or something like that? There is also a chance that the server disappears from the master list if it's either too busy, or if there are any connection issues (unfortunately Steam only uses UDP for queries, so there is a chance that some packets get lost).
It appears that by doing so on my test server it removed my main server from the list too
Hmm... basically this setting should not affect other server instances running on the same machine

I guess another way to fix any confusion would be to run the test server on a different port?
You cannot run more than one server on the same ip + same ports, i.e. every server needs its own port range.
-
Das ist tatsächlich ein Bug und sollte mit dem nächsten Update eigentlich behoben sein

-
Is it still missing? oO I can see the server in the list now, although 4 hours have passed since you created this topic...
Do you refer to the ingame server browser or the Steam server browser (in your Steam client under "View" -> "Servers")? -
@yahwho is right, this function gets the player which is considered as "hostile" by the npc. E.g. if you attack a pig, the pig considers you as hostile and runs away (once the distance between the npc and you is great enough, the "hostile status" will be removed again). If there is currently no "hostile player", this function returns null

-
Das ist tatsächlich ein interessantes Foto, allerdings scheint das kein Fehler zu sein, sondern die Flossen scheinen lediglich im Boden zu stecken. Das Terrain scheint leicht uneben zu sein, wodurch die NPCs etwas tiefer stehen, und entsprechend der Blickrichtung verschwindet eine Flosse (und sogar die halbe andere der linken Figur) etwas im Boden

-
Glad to hear it works now

I have one more question, is there a way to set it so just myself enters the server in creative mode?
You could disable all creative permissions in the "default.permissions" file. This file is the "base permission", i.e. it basically affects every player (group permissions inherit the default.permissions). So the "creative" section in the default.permissions file could look like this:
Now you could allow all creative permissions for the "admin.permissions", for example. As mentioned, the group permissions inherit the default.permissions, but can still override individual permissions. In this case, you could allow all creative-related permissions, so put this in your admin.permissions file (or more precisely, replace the current "creative" part in your permission file with this snippet):
As a result, only members of the permission group "admin" are allowed to access the creative mode
-
@Liralen: If you use the standalone, it's indeed necessary to allocate the memory manually. You can find a modified game exe attached which allocates 6 GB of RAM (3 GB Heap and 3 GB Direct memory) automatically

About the error: it's possible that it's related to the memory, but it looks like it mainly happens in multiplayer. Did it also happen in multiplayer in your case @thomasvitrano87?
-
Thanks for uploading the file
Unfortunately there are some minor issues in this file which prevents the server from loading these permissions...
In line 13, the - all commands does not work. If you want to allow all commands, you have to use the wildcard character (*), for example:
The "general" permissions - on the other hand - do not support a "allow/deny" structure, instead you have to specify the particular permission keys explicitly, e.g.:
Another small problem is in line 23, there is a space missing between "-" and "*" (I know, this looks like nitpicking, but unfortunately yaml is very strict about the syntax), so it should look like this:
You find more information about the permissions in this topic: Permission systemAbout the setting "settings_admin_allpermissions" in the server.properties file: If it's set to true, it means that owners/admins (i.e. all players which are set up as "admin" in the server.properties file) are not affected by permissions, they always have full access to all commands etc. If you set it to false, owners/admins will be treated like all other players, i.e. it depends on which permission group they're assigned to.
-
Is the normal raycast easier (the one that sends just along the x direction) on the performance than the others? I have the concept that it is only sending one ray out..
The performance is the same for these methods. The only thing that really matters is the "CollisionType", the more collision types you set, the bigger the impact on performance. For example, if you only want to check if the player is looking at another player, you should only define "CollisionType.PLAYERS" (in this case, the game only checks if the ray collides with other players, so there is no need for expensive checks if the ray also collides with npcs, vegetations etc)

getting the name of the npc is an interesting exercise in typing correctly but works fine but if I wanted to get a players information would it be Object obj = result.getCollisionObject(); PLAYER player = (PLAYER) obj;? So I can later get the UID and other information from the target player. I can't test this without help so was looking to save some development time for my code.
Yes, if the ray collides with a player, the "getCollisionObject()" function returns this particular player object. For example:
Display MoreJava -
Usually it's always recommended to use the main (public) branch. The "jdbc" branch was only an attempt to fix an issue with the jdbc driver a few people were having.
About the "official release": we don't have an ETA for that yet, it depends on how long it takes to get all important features into the game (and get all bugs sorted out).
About the performance issues, please see my response in your other topic
-
The main issue - according to the screen shot - is the view distance and detail distance: using the max setting requires powerful hardware, so I'd recommend to reduce these settings (especially the "detail distance", since it has the biggest impact on performance).
Apart from that, it mainly depends on your hardware. Maybe you can post a report file here, it contains important information about your RAM, CPU and graphics card. To do that, open the ingame console (key `) and type "report", then a file called report shows up in your game directory. Please upload this file here, or send it via email to support@jiw-games.net -
As @Trevor mentioned, sounds are usually handled as 3D sound, so they have a specific location in the world. If you want to play the sound as a 2D sound (so it does not have a direction/location), make sure to load a mono sound file and use the playSound(SoundInformation) method.
-
If you get the response "group not found", there is either no "admin" permission in the groups folder, or it contains syntax errors so the server could not load the permission. In this case you will see an error in the server log.
Maybe upload the "admin.permissions" file here, that's the easiest way to find out if there is something wrong with it
-
If you want to find out which object the player is currently looking at, the raycast() method is indeed what you're looking for
The method "shoots" a ray from the player camera position and checks if it collides with any solid objects. Since the raycast is performed clientside, a callback is required (if any collisions occurred, the result contains these information). You can find an example in the Javadoc.
A raycast is rather "expensive" in terms of performance (not expensive for the server, but for the particular client), however, it matters how often you actually perform it. It will only be a problem if it's performed too frequently, e.g. every tick, so using it in the PlayerChangePositionEvent or the UpdateEvent is not advisable. If you really have to perform a raycast frequently, there should be a delay of 50 or 100 ms (at least) between every raycast (per player). -
You can use the static Utils.ChunkUtils.getChunkPosition(Vector3f) function to convert a global position to chunk coordinates
