Giter VIP home page Giter VIP logo

hungergames-updated's Introduction

HungerGames

=============

Chat

BIG NOTE

COMPILING IT WITH pmt.mcpe.me WILL MAKE THE PLUGIN CORRUPTED. DOWNLOAD FROM RELEASES HERE

A HungerGames plugin for PocketMine-MP developed by xBeastMode

#New Features? Yes, of course. You can choose between SkyWars or HungerGames! How? You can make a game with the following command: /hg add

Watch my YouTube video showing bow to setup a game arena: MCPE - HG plugin tutorial updated

When you join a game the plugin will automatically backup the map.

  • Other features: Scripts have been added. I did not make any scripts for it yet, maybe in the future.

#How to setup a join sign?

on the first line set the line to "hg" and on the second line set the line to the name of your game. The sign should now refresh automatically and you'll be able to join.

or... join a game by simply typing: /hg join <game>

#Future updates? I am planning to adding many more features to this plugin, if you wish me to add one, please say it in issues, thank you.

  • For Devs:

This plugin comes with a script loader api. You can use this to access game functions, like when player joins, quits, wins, etc. You do not need to enable it, as it loads itself.

If you wish to create one here's an example code:

Click here to view example:
//Example script:


<?php
class ExampleScript extends \hungergames\api\scripts\HGAPIScript{
    public function __construct(){
        parent::__construct("Script names here", "Versions here 1.0", "Authors here xBeastMode");
    }
    public function onLoad(){
        $this->sendConsoleMessage("Test script loaded!");
    }
}


//All function from this script api are:

/**
     * Creates script config
     *
     * @param $name
     * @param array $values
     * @return Config
     */
    public void function createConfig($name, array $values)
    /**
     * Gets script config
     *
     * @return Config
     */
    public Config function getConfig()
    /**
     * Gets the name of the script
     *
     * @return string
     */
    public string function getName()
    /**
     * Gets the name of the script
     *
     * @return string
     */
    public string function getVersion()
    /**
     * Gets the author of the script
     *
     * @return string
     */
    public string function getAuthor()
    /**
     * disables script
     */
    public void function setDisabled()
    /**
     * enables script
     */
    public void function setEnabled();
    /**
     * returns whether script is enabled or not
     *
     * @return bool
     */
    public bool function isEnabled()
    /**
     * Sends console message
     *
     * @param $message
     */
    public void function sendConsoleMessage($message)
    /**
     * Called when script is loaded
     */
    public function onLoad(){
    //your code here
    }
    /**
     * called when player joins game
     *
     * @param Player $p
     * @param HungerGames $game
     */
    public function onPlayerJoinGame(Player $p, HungerGames $game){
    //your code here
    }
    /**
     * called when player quits game
     *
     * @param Player $p
     * @param HungerGames $game
     */
    public function onPlayerQuitGame(Player $p, HungerGames $game){
    //your code here
    }
    /**
     * Called when player fails to join full game
     *
     * @param Player $p
     * @param HungerGames $game
     */
    public function gameIsFull(Player $p, HungerGames $game){
    //your code here
    }

    /**
     * Called when player is waiting for players
     *
     * @param array $players
     * @param HungerGames $game
     */
    public function whileWaitingForPlayers(array $players, HungerGames $game){
    //your code here
    }
    /**
     * Called when player is waiting for players
     *
     * @param array $players
     * @param HungerGames $game
     */
    public function whileWaitingToStart(array $players, HungerGames $game){
    //your code here
    }
    /**
     * Called when game starts
     *
     * @param array $players
     * @param HungerGames $game
     */
    public function onGameStart(array $players, HungerGames $game){
    //your code here
    }
    /**
     * Called when death match starts
     *
     * @param array $players
     * @param HungerGames $game
     */
    public function onDeathMatchStart(array $players, HungerGames $game){
    //your code here
    }
    /**
     * Called when players wins a game
     *
     * @param Player $p
     * @param HungerGames $game
     */
    public function onPlayerWinGame(Player $p, HungerGames $game){
    //your code here
    }information

Commands:

  • /hg add : adds a new game

    • OP perm: hg.command.add
  • /hg del : deletes a game  * OP perm: hg.command.del

  • /hg min : changes the number of minimum players required to start a game

    • OP perm: hg.command.min
  • /hg max : changes number of maximum players that can enter a game

    • OP perm: hg.command.max
  • /hg level : changes level of game where players are gonna go  * OP perm: hg.command.level

  • /hg ws : sets amount of seconds to wait before game starts  

    • OP perm: hg.command.ws
  • /hg gs : sets amount of second to pass before death match starts

    • OP perm: hg.command.gs
  • /hg addslot : adds new slot to game (positions sets where you are standing)

    • OP perm: hg.command.slot.add
  • /hg delslot : deletes slot from game by name

    • OP perm: hg.command.slot.del
  • /hg lobby : sets the lobby position of a game where you're standing

    • OP perm: hg.command.lobby
  • /hg dm : sets the death match position of a game where you're standing

    • OP perm: hg.command.dm
  • /hg leave : leaves game that you are playing

    • OP perm: none
  • /hg join : join a new game

    • OP perm: none

hungergames-updated's People

Contributors

haxley avatar poggit-bot avatar xbeastmode avatar xxsirgamesxx 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.