GithubHelp home page GithubHelp logo

myplayer's Introduction

MyPlayer

A Java PlayerAPI

Presentation

MyPlayer is a development API that will serve you especially in your games to offer modules to your players (Mods). It will also offer you a fluidity and personal settings.

Player Module

The player module is a module that is going to be given to the player only and not to the set of players created, it allows that a player has a module, and not another

All-Players Modules

The All-Players module is a module group that will be added to all players during a load of modules

How to install ?

Add MyPlayer.jar in your Java Build Path of your project

How to use ?

Players

Creating a player

To create a player its very simple :

Player p = new Player(name, displayname);

Get player name

p.getName(); // Return STRING

Get player displayname

p.getDisplayName(); // Return STRING

Add module to player

p.addPlayerModule(name, module);

Remove module to player

p.removePlayerModule(name);

Load player module

p.loadPlayerModules();

Load All-Players Module

p.loadMainModules();

Modules

Creating a module

To create a new module, you need to create a new Java Project,

Create a new package named :
com.module

Create a new class named : Module[NAMEOFJARWITHOUT.JAR]

Implement the class with Module

Create a new Config :

Config config = new Config(name of module, author, version, description, website, isplayermodule);

And change :

	@Override
	public Config getConfig() {
		return null;
	}
  
to :

	@Override
	public Config getConfig() {
		return config;
	}

You can code in

	@Override
	public void execute() {
		System.out.println("The module " + config.getName() + " is started !");
	}


When your module is finished you can export it and move it to MyPlayer/Modules

myplayer's People

Contributors

dandan2611 avatar

Watchers

 avatar

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.