player-events | Sends a configurable message | Game Engine library
kandi X-RAY | player-events Summary
kandi X-RAY | player-events Summary
A Fabric mod that executes and sends configurable commands and messages respectively on certain events triggered by a player, such as Dying, Joining a server, Killing another player, etc. Since 2.2.0 Datapacks can define functions that will be executed on an event, using the corresponding function tag #player_events:.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Test whether the command has an action group
- Sets the kill entity actions
- Test action
- Test whether kill player actions are set
- Run a simple action
- Test all the custom commands that are sent to the server
- Register the server
- Registers the main command node
- Initializes the reload command
- Load the list of events
- Called when a player is killed
- Executes kill entity actions
- Executes the kill player actions
player-events Key Features
player-events Examples and Code Snippets
{
"first_death": {
"actions": [
"${player} died for the first time"
],
"broadcast_to_everyone": true,
"pick_message_randomly": false
},
"death": {
"actions": [
"${player} just died!"
],
"broadcast_to_ever
repositories {
maven {
url 'https://maven.bymartrixx.me'
}
}
dependencies {
// Using the version from the gradle.properties
modImplementation "me.bymartrixx.player-events:api:${project.player_events_api_version}"
//
Community Discussions
Trending Discussions on player-events
QUESTION
Here's code:
...ANSWER
Answered 2019-May-25 at 21:47tldr;
Add Thread.currentThread().join();
after calling play method of media player inside the class hosting the callback. It will somehow keep the thread running, preventing the execution stopping due to end of executable logic in case any native lib error.
After doing many experiments or say trial and error, I found this.
Something else needed to keep the application running or otherwise even a single error in native code while processing the stream will kill the whole application. The actual code from where I took usage example of custom renderer is opening a jwt Frame which is keeping the application open. I removed it as I need not to show anything. But, now I started getting the problem. There's no other work left for the running thread/class, any error originating in native lib will break the connection(an expert might use a better terminology here) and hence the program will close, in return JNI will fire callback object is garbage collected.
I was using the Thread.currentThread().join();
but outside the class after creating an instance, hence effecting nothing for the class hosting the callbacks for rendering/processing the data.
Thinking more about what the jwt Frame might be doing, I removed it and replaced with Thread.currentThread().join();
inside the constructor, voila it started working perfectly.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install player-events
You can use player-events like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the player-events component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page