[FilterScript] Dealership plugin for shoebill (Java)
#1

Dealership plugin for shoebill
Powered by:
[ame]http://www.youtube.com/watch?v=Au9CRYxMFBU[/ame]
First: This is a plugin for Shoebill, and can't be used with Pawn-Gamemodes at this time.

Features:
  • Written in Java
  • Dialogs as main interface
  • Customize plugin in your gamemode
  • Vehiclelicenses which will expire
  • Vehiclelicenses can be added in the gamemode
  • MySQL
  • Open Source (GitHub)
  • Multi-Language (German, English, Simplified chinese)
What benefits do I get when using the plugin?
  • It's faster then Pawn
  • Detailed errors (Exceptions) at runtime
  • Fast and easy development because of Java
Disadvantages?How to use the plugin?


- You can download the .jar file on the Jenkins Server, or you get the artifacts with maven.
- If you want to use Maven, you need to add the following code to your pom.xml:
Code:
<dependency> 
    <groupId>org.marvin</groupId>
    <artifactId>dealership</artifactId>
    <version>0.1-SNAPSHOT</version>
    <type>jar</type>           
    <scope>compile</scope>
</dependency>
How to use the plugin in my gamemode?


- You get the DealershipPlugin Instance:
Code:
private DealershipPlugin dealershipPlugin;
dealershipPlugin = Shoebill.get().getResourceManager().getPlugin(DealershipPlugin.class);
- Now you can add vehicle licenses:
Code:
dealershipPlugin.getBuyableLicenses().add(new BuyableVehicleLicense(411, 12500, 5)); //Adds a license for the vehicle 'Infernus' which will cost 12.500$ and will be valid for 5 days.
- If you use a Anti-Money-Cheat system, you need to customise the money getter & setter function:
Code:
dealershipPlugin.setAddMoneyFunction((player, integer) -> {
            player.giveMoney(integer);            
            //Or own function to set server money
});
dealershipPlugin.setMoneyGetter(player -> player.getMoney()); //Or own function
- You can change the language of the player like this:
Code:
 dealershipPlugin.setPlayerLanguage(player, "DEU");
 dealershipPlugin.setPlayerLanguage(player, "ENG"); //etc.
//Or show him selection dialog:
dealershipPlugin.getShowLanguageDialog().accept(player);
Thanks to:
  • mk124 for the translation & the beta testing
Here you can get the localized strings & mysql access file: http://puu.sh/9jvUr/d4aca2349f.rar
Reply
#2

very nice !
Reply
#3

Good job
Reply
#4

Great job again.
Reply
#5

Very nice.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)