Giter VIP home page Giter VIP logo

shoebill-api's Introduction

Shoebill Framework API

Shoebill Title Banner

Join the chat at https://gitter.im/Shoebill/shoebill-api Build Status

What is the shoebill-api?

The shoebill-api project is one part of the whole Shoebill project. You can download and browse all the builds from our Jenkins server located at Jenkins or directly download the newest version from here

Getting Started & Documentation

You should take a look at our Github-Wiki and use our Project Generator

Resources

Currently, there are some videos on how to setup a Shoebill server & create your first gamemode. There also is a JavaDoc at Shoebill-API JavaDoc. The videos can be found here:

Setting up a shoebill server:

Setting up a Shoebill Server

Creating your first gamemode in IntelliJ IDEA 14:

Gamemode in IntelliJ IDEA 14

Creating your first gamemode in Eclipse:

Gamemode in Eclipse

How to use it?

If you want to use the shoebill-api, you will either have to download the dependency from our Jenkins server and add it manually to your game mode (different from IDE to IDE), or better: You use maven, and you just have to add our repository to yours section. The following code is needed, in order to access all shoebill related artifacts:

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

After that, you can add the following dependency into your pom.xml file in the section:

<dependency>
    <groupId>net.gtaun</groupId>
    <artifactId>shoebill-api</artifactId>
    <version>1.2-SNAPSHOT</version>
</dependency>

Example Usage

If you successfully added the shoebill-api to your java 8 project, you can create a new class and let it extend from the class "Gamemode". Implement the needed methods (onEnable, onDisable) and you are ready to go (gamemode.yml must be setup first to run the project). Here is a little example:

public class MyGamemode extends Gamemode {

    private Logger logger;

    @Override
    public void onEnable() {
        logger = getLogger(); //you can access different methods from the Gamemode Baseclass
        //Do stuff, e.g. load mysql database and create instances of new classes that handle events etc.
        logger.info("My gamemode has been loaded!");
    }

    @Override
    public void onDisable() {
        logger.info("My gamemode is shutting down...");
        //Stop mysql connection, save files etc.
        logger.info("My gamemode has been shutted down!");
    }
}

Here is another little example:

public class MyGamemode extends Gamemode {

    @Override
    public void onEnable() {
       getEventManager().registerHandler(PlayerConnectEvent.class, (e) -> {
            Player player = e.getPlayer();
            player.sendMessage(Color.GREEN, "Hello " + player.getName() + ", on my server!");
        });
    }

    //onDisable()...
}

shoebill-api's People

Contributors

123marvin123 avatar alf21 avatar gitter-badger avatar jojllman avatar mk124 avatar trojaner avatar utkinn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

shoebill-api's Issues

How can I get?

How can I get this project?

With the SAMP Forum ending and the links here returning 404, how do I get this project?

Would the solution be to fork and do my own build?

Casting AngledLocation to Vector3D

[15:36:38][ERROR][err] Caused by: java.lang.ClassCastException: [Ljava.lang.Obje
ct; cannot be cast to [Lnet.gtaun.shoebill.data.Vector3D;

This error occurs everytime I try to cast an ArrayList to a Vector3D[] array after adding a Location (player.getLocation()); to the ArrayList

example:

ArrayList<Vector3D> controlPoints = new ArrayList<>();
controlPoints.add((Vector3D) player.getLocation());

and then

Vector3D[] tmp = (Vector3D[]) controlPoints.toArray();

Repo is dead

Trying to add maven dependecy, you'll get an error.
I checked your domains for repo and they are alive, but inaccessible.
Please fix it or just give me the .jar of Shoebill to add it manually.
thx

The problem of shoebill

Hi. I was using Shoebill for about a year and really like it. However, I personally think that the project is unnecessarily too complex, there are a lot of sub-projects, dependencies, documentation, and it is really hard to get started with the plugin.

My idea is to simplify the project on a single github repo, and offer it as a standard Java library published on the maven central or in gtaup repo as well, so all you need is to add a dependency to maven/gradle or the shoebill jar to classpath.

So, for example, imagine a repo at github/Shoebill/Shoebill:
plugin/ -- The plugin code
api/ -- A single maven project

Then, the documentation could be in a single README.md, DOC.md, or even on /wiki.
All issues on /issues, or add /releases where you could download Shoebill/Shoebill.dll and all needed folders. So, to get started you will have to:

  • Install JDK
  • Add to your java project a 'net.gtaun:shoebill:1.0' or download the raw jar
  • Put your gamemode jar on shoebill/jars or use the existing maven support
  • Run startup.sh or link your PATH to the JDK directory

This way will make the project much easier to understand, to contribute, to maintain and to get started.
Of course I dont want to rewrite shoebill from scratch. But to merge all projects (shoebill-util, shoebill-api, shoebill-runtime, etc...) into a single "core" project. And, start simplifying/refactoring all the existing codebase if necessary.
There are a growing number of people interested in writting gamemodes for Java, C#, PHP, JS, etc.. because PAWN simply isn't that powerfull. So, this project can grow a lot.

Of course this is a personally mean, I would like to know your opinion Marvin.

A problem with registerHandler method

I got an error: The type kotlin.jvm.functions.Function1 cannot be resolved. It is indirectly referenced from required .class files

databaseManager = new DatabaseManager(); loginManager = new LoginManager(this, databaseManager); eventManager = getEventManager(); eventManager.registerHandler(PlayerConnectEvent.class, loginManager);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.