SA-MP Forums Archive
[Plugin] Shoebill 1.1 - SA-MP Java Development Kit - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Plugin Development (https://sampforum.blast.hk/forumdisplay.php?fid=18)
+--- Thread: [Plugin] Shoebill 1.1 - SA-MP Java Development Kit (/showthread.php?tid=397735)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37


Re: [UPDATE][SNAPSHOT][Java 8] Shoebill 1.1 - SA-MP Java Development Kit - Su37Erich - 06.01.2016

Thank you! Furthermore did you find the reason why the "callback" I mean the event, is called twice?
EDIT: IntelliJ show me that I should use Test. instead the Instance method? Both ways work


Re: [UPDATE][SNAPSHOT][Java 8] Shoebill 1.1 - SA-MP Java Development Kit - mk124 - 06.01.2016

@Su37Erich: There is an issue with the internal plugin. An interim solution is to add an empty pawn game mode to your server.cfg and remove any filter script. Create a new .pwn file and replace the content with this:

pawn Код:
#include <a_samp>
main()
{}
then compile it and replace it with the game mode in server.cfg. I will inform you, when the issue is fixed.


Re: [UPDATE][SNAPSHOT][Java 8] Shoebill 1.1 - SA-MP Java Development Kit - mk124 - 06.01.2016

@Su37Erich: I pushed an update that fixes the .disallow() method (plugin), but I think the OnPlayerSpawn event is getting called twice when the player first connects. I don't think there is a global solution to this problem.


Re: [UPDATE][SNAPSHOT][Java 8] Shoebill 1.1 - SA-MP Java Development Kit - mk124 - 23.01.2016

Because you need to tell Shoebill where you installed Java is. In the new startup.sh file, you can simply uncomment the first line and add the installation path of your JDK and Shoebill should start without a problem.

Your startup.sh file should look like this:
Код:
export JRE_HOME=/usr/java/jre1.8.0_45
export LD_LIBRARY_PATH=.:$JRE_HOME/lib/i386/client:$JRE_HOME/lib/i386/server:/usr/local/lib
./samp03svr



Re: [UPDATE][SNAPSHOT][Java 8] Shoebill 1.1 - SA-MP Java Development Kit - Urukhay - 23.01.2016

My path needs 3 "JRE_HOME".


Re: [UPDATE][SNAPSHOT][Java 8] Shoebill 1.1 - SA-MP Java Development Kit - mk124 - 23.01.2016

This startup.sh version should work too.


Re: [UPDATE][SNAPSHOT][Java 8] Shoebill 1.1 - SA-MP Java Development Kit - Urukhay - 23.01.2016

This startup.sh works:
Код:
export JRE_HOME=/usr/java/jre1.8.0_45/lib/i386
export LD_LIBRARY_PATH=.:$JRE_HOME:$JRE_HOME/client:$JRE_HOME/server:/usr/local/lib
./samp03svr
But this startup.sh does not works:
Код:
export JRE_HOME=/usr/java/jre1.8.0_45/lib/i386
export LD_LIBRARY_PATH=.:$JRE_HOME/client:$JRE_HOME/server:/usr/local/lib
./samp03svr



Re: [UPDATE][SNAPSHOT][Java 8] Shoebill 1.1 - SA-MP Java Development Kit - mk124 - 23.01.2016

I added a new version of the startup.sh file to the downloadable zip archive that should throw out an error message when the JRE_HOME is not set and also fixed the path.


Re: [UPDATE][SNAPSHOT][Java 8] Shoebill 1.1 - SA-MP Java Development Kit - Urukhay - 24.01.2016

When startup.sh runs then log gives errors:

Код:
Skipped artifact example-lvdm-1.0-SNAPSHOT.jar (Gamemode)
[INFO][ShoebillImpl] Could not find shoebill/log4j.xml file. The default configuration will be used.
[INFO][ShoebillImpl] There's no gamemode assigned in resources.yml or file not found.
resources.yml has assigned gamemode:
Код:
gamemode: example-lvdm-1.0-SNAPSHOT.jar
Path in the shoebill.yum has commented:
Код:
# customRepositoryPath: ''



Re: [UPDATE][SNAPSHOT][Java 8] Shoebill 1.1 - SA-MP Java Development Kit - dusk - 24.01.2016

Well does server/shoebill/gamemodes/example-lvdm-1.0-SNAPSHOT.jar exist?


Re: [UPDATE][SNAPSHOT][Java 8] Shoebill 1.1 - SA-MP Java Development Kit - mk124 - 24.01.2016

@Urukhay: Remove the .jar from the game mode name in the resources.yml, Shoebill will add it automatically.


Re: [UPDATE][SNAPSHOT][Java 8] Shoebill 1.1 - SA-MP Java Development Kit - Urukhay - 24.01.2016

@mk124

Error remained.

Код:
Skipped artifact example-lvdm-1.0-SNAPSHOT (Gamemode)



Re: [UPDATE][SNAPSHOT][Java 8] Shoebill 1.1 - SA-MP Java Development Kit - Urukhay - 24.01.2016

And gives lots of errors.

Код:
[ERROR][err]  at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
[14:14:00][ERROR][err]  at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
[14:14:00][ERROR][err]  at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(Unknown Source)
[14:14:00][ERROR][err]  at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(Unknown Source)



Re: [UPDATE][SNAPSHOT][Java 8] Shoebill 1.1 - SA-MP Java Development Kit - mk124 - 24.01.2016

If you download the full package of Shoebill and start it without modifying any files except the startup.sh / bat, it will work. You must have modified something.


Re: [UPDATE][SNAPSHOT][Java 8] Shoebill 1.1 - SA-MP Java Development Kit - Alf21 - 24.01.2016

This start.sh works, but you need to change your JAVA_HOME Path to JRE 8
Код:
#!/bin/bash
#export JAVA_HOME=Path to JDK8 (32-bit)
export JAVA_HOME=/opt/java/jdk1.8.0_65
export LD_LIBRARY_PATH=.:$JAVA_HOME/jre/lib/i386:$JAVA_HOME/jre/lib/i386/client:$JAVA_HOME/jre/lib/i386/server:/usr/local/lib
./samp03svr
Here update-shoebill.sh
Код:
#!/bin/bash
#export JAVA_HOME=Path to JDK8 (32-bit)
export LD_LIBRARY_PATH=.:$JAVA_HOME/jre/lib/i386/client:$JAVA_HOME/jre/lib/i386/server:/usr/local/lib
$JAVA_HOME/jre/bin/java -jar shoebill-updater.jar
//edit if it does not work, i believe there is an error in your environment pathes, eg in LD_LIBRARY_PATH


Re: [UPDATE][SNAPSHOT][Java 8] Shoebill 1.1 - SA-MP Java Development Kit - Urukhay - 24.01.2016

Thanks for answers.


Re: [UPDATE][SNAPSHOT][Java 8] Shoebill 1.1 - SA-MP Java Development Kit - Urukhay - 25.01.2016

Can SA:MP server provide 2+ threads by Shoebill?


Re: [UPDATE][SNAPSHOT][Java 8] Shoebill 1.1 - SA-MP Java Development Kit - Alf21 - 25.01.2016

Why do you want to use two Shoebill Threads? You can use Plugins and Gamemodes written in Java for Shoebill, so if you want to build extensable or something like this, weite plugins and communicate with them through a main gamemode


Re: [UPDATE][SNAPSHOT][Java 8] Shoebill 1.1 - SA-MP Java Development Kit - Urukhay - 25.01.2016

I mean Java threads (Interface Runnable). Is SA:MP server 1-thread service?


Re: [UPDATE][SNAPSHOT][Java 8] Shoebill 1.1 - SA-MP Java Development Kit - dusk - 25.01.2016

SAMP does run on only one thread. You can run tasks in the background with Java threads but once all samp related code must be executed from the main samp thread. For that use Shoebill().get().runOnSampThread().