[Plugin] Shoebill 1.1 - SA-MP Java Development Kit

How should interrupt() and disallow() methods work in PlayerTextEvent? Because when I use interrupt() in the middle of event handler, the code in this event handler doesn't interrupt in the place, where I used interrupt(), but another event handler (with lower priority) doesn't work.
And when I use disallow(), my message sends in chat.
Reply

@SetupDLL: Ok, I'm sorry for the problems. Please update shoebill-runtime (switch to onlineMode -> Start Server -> Switch back to offlineMode) and then it should work.

//Edit: Ok, now it's working. Please update the plugin with update-shoebill.bat. (and shoebill-runtime as mentioned above)
Reply

thank you for quick fixes!
Reply

No problem If you have any questions, you can post them here, so other people can see them too
Reply

Can anyone explain me how to call a native of a plugin such as streamer?
Reply

@stokdam: In the current build you can only call functions from a pawn file. But I made a update today, and I will push it tomorrow, and then you can call native functions. But there is a streamer for shoebill. You can get it with this dependency:

<dependency>
<groupId>net.gtaun</groupId>
<artifactId>shoebill-streamer</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>

And use it like this:

DynamicSampObject.create(...)

I will write you a private message tomorrow.
Reply

Quote:
Originally Posted by mk124
Посмотреть сообщение
@stokdam: In the current build you can only call functions from a pawn file. But I made a update today, and I will push it tomorrow, and then you can call native functions. But there is a streamer for shoebill. You can get it with this dependency:

<dependency>
<groupId>net.gtaun</groupId>
<artifactId>shoebill-streamer</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>

And use it like this:

DynamicSampObject.create(...)

I will write you a private message tomorrow.
Thankyou, i didn't know there was a streamer for shoebill, it was the only plugin i need because all other things such as mysql are availble in java directly, i'm goinig to test it.

EDIT: It says "Missing artifact net.gtaunhoebill-streamer:jar:1.0-SNAPSHOT" in pom.xml
Reply

What do you mean? Are you in offlineMode?
Reply

It seems that it cant find the dependency
Reply

Which repositories do you use right now?
Reply

Код:
<repositories>
		<repository>
			<id>gtaun-public-repo</id>
			<name>GTAUN Public Repository</name>
			<url>http://repo.gtaun.net/content/groups/public</url>
		</repository>
		
		<repository>
     		<id>sonatype-nexus-snapshots</id>
     		<name>Sonatype Nexus Snapshots</name>
     		<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
     		<snapshots>
         		<enabled>true</enabled>
          		<updatePolicy>daily</updatePolicy>
      		</snapshots>
		</repository>
	</repositories>
Reply

Ok, looks fine. Are you sure that you use the correct dependency?
Can you access DynamicSampObject? Do you get in error in the console?
Reply

No, I cant access DynamicSampObject. I just copied and pasted the dependency from your previus post:
Код:
<dependency>
<groupId>net.gtaun</groupId>
<artifactId>shoebill-streamer</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
Reply

These are my settings, and I can access DynamicSampObject and it's members:


<repositories>
<repository>
<id>sonatype-nexus-snapshots</id>
<name>Sonatype Nexus Snapshots</name>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy>
</snapshots>
</repository>

<repository>
<id>gtaun-public-repo</id>
<name>GTAUN Public Repository</name>
<url>http://repo.gtaun.net/content/groups/public</url>
</repository>
</repositories>

and the dependency:

<dependency>
<groupId>net.gtaun</groupId>
<artifactId>shoebill-streamer</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>

The dynamic object is located in this package: net.gtaun.shoebill.object.*
Other people can access it too, which IDE are you using? Maybe you need to reimport the maven project.
Reply

[Image: 1yYJNMw]

- All callbacks that handle return values are now correctly usable. (Cancel PlayerUpdateEvent, PlayerTextEvent, etc.)
- You can now call native functions from other plugins (make sure the shoebill plugin is the first entry in the plugins line in your server.cfg)
- Fixed the player.spawn() bug, they will now spawn normally

[Image: 1yH03Tv]

Cancel callbacks:
Код:
eventManager.registerHandler(PlayerTextEvent.class, event -> {
            if(event.getPlayer().isSpectating())
                event.disallow(); //There will be no message in the chat if the player is currently spectating somebody
});
Call native functions:
Код:
AmxCallable createDynamicObject = null;
for(AmxInstance instance : Shoebill.get().getAmxInstanceManager().getAmxInstances()) {
        createDynamicObject = instance.getNative("CreateDynamicObject");
        if(createDynamicObject != null) {
                //found CreateDynamicObject native, call it like this:
                createDynamicObject.call(18421, ....); //normal pawn arguments. Make sure you put a f after a Float value, like this: 13.0f or 0f
                break;
       }
}
Please use the shoebill-updater, because the launcher, the plugin and the runtime has been changed. Run update-shoebill.bat/sh (located in the root-directory of your server) and it will download the newest files from our servers.
Reply

Quote:
Originally Posted by mk124
Посмотреть сообщение
These are my settings, and I can access DynamicSampObject and it's members:


<repositories>
<repository>
<id>sonatype-nexus-snapshots</id>
<name>Sonatype Nexus Snapshots</name>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy>
</snapshots>
</repository>

<repository>
<id>gtaun-public-repo</id>
<name>GTAUN Public Repository</name>
<url>http://repo.gtaun.net/content/groups/public</url>
</repository>
</repositories>

and the dependency:

<dependency>
<groupId>net.gtaun</groupId>
<artifactId>shoebill-streamer</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>

The dynamic object is located in this package: net.gtaun.shoebill.object.*
Other people can access it too, which IDE are you using? Maybe you need to reimport the maven project.
I downloaded shoebill-streamer from the github repository and added it to my projects and now eclipse can resolve the dependency.
Reply

Ok, so it's working now?
Reply

Yes.
Reply

I just made a little video on how to setup a project in IntelliJ IDEA 14:
https://www.youtube.com/watch?v=g2SOqax3Euw
Reply

I'm getting "Unknown command" messages, but cmds work correctly
Reply


Forum Jump:


Users browsing this thread: 14 Guest(s)