Minecraft Bibo38Lib mod 2026 download
logo
minecraft mod Bibo38Lib

Bibo38Lib

Game Version: CB 1.7.9-R0.1
Total Downloads: 12,936
Updated: Jun 4, 2014
Created: Sep 15, 2012
Download Bibo38LibDownload Earlier Versions

Earlier Versions

Name Size Uploaded Game Version Downloads
Bibo38Lib-v1.0 release 64.60 KB Jun 4, 2014 CB 1.7.9-R0.1 2,326 download Bibo38Lib Bibo38Lib-v1.0 releaseDownload
Bibo38Lib-v0.95 release 46.44 KB Apr 16, 2014 1.7.4 777 download Bibo38Lib Bibo38Lib-v0.95 releaseDownload
Bibo38Lib-v0.93 release 46.00 KB Oct 5, 2013 1.6.4 5,381 download Bibo38Lib Bibo38Lib-v0.93 releaseDownload
Bibo38Lib-v0.81 release 25.58 KB Jul 20, 2013 1.6.2 2,019 download Bibo38Lib Bibo38Lib-v0.81 releaseDownload
Bibo38Lib-v0.8 release 22.62 KB May 26, 2013 CB 1.5.2-R0.1 786 download Bibo38Lib Bibo38Lib-v0.8 releaseDownload
Bibo38Lib-0.7 release 20.27 KB Sep 15, 2012 CB 1.3.1-R2.0 1,647 download Bibo38Lib Bibo38Lib-0.7 releaseDownload

Description

Share this:

This is my personal library for developing Bukkit Server Plugins!

I have written it to help me faster writing Plugins by using a set of large features like
auto generated Plugin help Pages and you will need it for most of my Plugins!

Installation

  • Download the Jar-File and put it in your plugins folder
  • Restart or reload your Server
  • Enjoy my Plugins

Soft Dependencies

Bibo38lib uses the following plugins if installed:

  • Vault
  • SpoutPlugin (won't be needed at this time, but there is also some code in the Library)

Plugins using Bibo38Lib

Following Plugins from me use and need Bibo38lib:

  • ChgUsers

API

How to start coding with my library

Download my library form dev.bukkit or clone it from Github and add it to
your Project Build Path like the Bukkit API!

Permissions

Bibo38lib support easy Permissions using Vault.
Here is an usage example:

Permissions perm = new Permissions("myplug");
boolean canUse = perm.hasPerm(player, "use"); // check if player has the Permission myplug.use

If a Player has not the Permission, a message will be automatical displayed!

Economy

Economy is as easy as Permissions using Vault:

Economy myeco;
try
{
    myeco = new Economy();
} catch(NullPointerException e)
{
    // No Economy or no vault found!
}

myeco.giveMoney(player, -200); // Remove 200 from Players money
myeco.giveMoney(player, 200); // Give the Player 200
myeco.setMoney(player, 100); // Set the players money to 100

You must only check for an NullPointerException if the Server has no Economy or
no Vault installed!

Commands

You can easy write Commands using a special class:

public class CmdListener implements CommandListener
{
    @ACommand(maxArgs = 0, description = "Resets the Player Count to the normal Values", permissions = "reset")
    public void reset(CommandSender cs, String[] args)
    {
        // /myplug reset
    }

    @ACommand(maxArgs = 1, minArgs = 1, usage = "[players]", description = "Adds or removes an amount of Players automatically", permissions = "autoadd", playerNeed = true)
    public void autoAdd(CommandSender cs, String[] args)
    {
        // Adds the command /myplug autoadd with one argument
    }

    @ACommand(maxArgs = 0, description = "Removes the Plugin in a clean way!")
    public void remove(CommandSender cs, String[] args)
    {
        // /myplug remove
    }
}

You use Annotations to set the Command Description an other things like permissions or max arguments.
Even if the command doesn't need Arguments or a CommandSender you must put them into the method.
To register the Command you must invoke the following Command in your onEnable() method

new Command(this, "myplug", new CmdListener());

And if you put the command myplug into your plugins.yml file you can use it
and you have an automatical help included: /myplug help

WebServer

Bibo38Lib includes a full Webserver(port 2345) for hosting files from your Plugin, so that other users can download them:

WebServer server = Startfunc.getMain().getSpout().getServer();
try {
    String url = server.addFile(this.getResource("pic.png"), "pic", "png");
    System.out.println("You can download the picture here: " + url);
} catch (IOException e) {}

or you can register a function, which will get called, if a special page is requested:

public class TestPlugin extends JavaPlugin implements WebService
{
    public void onEnable()
    {
        WebServer server = Startfunc.getMain().getSpout().getServer();
        server.registerService("info.htm", this);
    }

    public void recive(String file, Header header, OutputStream out, InetAddress addr)
    {
        if(file.equals("info.htm") && header.getMethod().equals("GET"))
        {
            try {
                Header back = new Header(200, 1.0);
                back.setHeader("Content-Type", "text/plain; charset=UTF-8");
                out.write(back.toString().getBytes());

                out.write("Your User Agent: ".getBytes());
                out.write(header.getHeader("User-Agent").getBytes());
            } catch (IOException e) {}
        }
    }
}

JavaDocs

I haven't created the Javadocs and they are also in the sources in German, which I
will fix in the next time!

Source Code

GitHub

Comments

Add a comment