Game Framework

Game Framework

What is it?

Game Framework is an easy to use, event-based bukkit plugin that developers can hook into to easily create new Minecraft gamemodes. The plugin allows developers to bypass the annoying hassle that plagues us all - Threads and Runnables. This plugin handles it all for you, and presents it in a simple-event based structure.

How do I use it?

  1. Download the plugin file (.jar)
  2. Add the file to your /plugins/ folder
  3. Add the file to your projects Build Path
  4. Done! Start hooking into the events and code away!

Note: Using the function GameFramework.getState() returns the current game state of the game. Similarly, using GameFramework.getTime() returns the time left in the current timer.

Configuration

Upon starting up, GameFramework will create a config.yml. The default values inside are all 30. lobby.time changes the length of the lobby. ingame.countdown is the length of the countdown time before ingame starts. ingame.time is the length of the ingame. restart.time is the length of the restarting time.

What do you mean, "Event Based" system?

The event based system means that all time-related problems will run on an event. For example, right when the server fires up, a LobbyStartEvent is thrown. You may want to say a message for the available maps, or the map it's going to play, etc. Similarly, every time the timer ticks down one, a TimeChangeEvent is thrown. This is useful if you want to broadcast how much time is left every minute, 5 minutes, etc.

There is an event for nearly every significant phase of a game, so don't worry! A full list of events are listed below.

  • Lobby Start Event
  • Lobby Attempt End Event
  • Lobby End Event
  • Lobby Restart Event
  • Ingame Countdown Start Event
  • Ingame Countdown End Event
  • Ingame Start Event
  • Ingame End Event
  • Restarting Start Event
  • Restart Event
  • Time Change Event

A full breakdown and description of each event is located here.

Permissions/Commands

This plugin has no permissions or commands. A general user will not know if this plugin is in use without access to /plugins.

Example Plugin

The test plugin can be found here. Feel free to use any part of that code as your own, it is to simply to show the functionality of the events. This is a very, very basic example of how this framework can be used, a fully functional Ultra Hardcore plugin has been created on this framework!


Comments

Posts Quoted:
Reply
Clear All Quotes

About This Project

Categories

Members

Recent Files