Giter Site home page Giter Site 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

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hungergames-updated's Issues

World

This support multiworld?, i have the problem:

ArrayOutOfBoundsException: "Undefined index: level" ( E_NOTICE) in "/ph
ar_HungerGames-master_3yoJO8QP5m3m1vN.phar/src/xbeastmode/hg/etc/EndGam e" at line 46

The game doesn´t end

When Is The Major Update?

I Just Wanted To Ask You About The Major Update. When Is The Major Update Is Gonna Come Out? I Already Gave You All The Ideas For The Update On YouTube. Just Asking Don't Be Mad Pls.

~ QimieGaming

Again The Same Error

[22:19:23] [Server thread/CRITICAL]: "Could not pass event 'pocketmine\event\player\PlayerInteractEvent' to 'HungerGames vBuild#16': Class hungergames\lib\utils\Loader not found on hungergames\EventListener
[22:19:23] [Server thread/CRITICAL]: ClassNotFoundException: "Class hungergames\lib\utils\Loader not found" (EXCEPTION) in "/src/spl/BaseClassLoader" at line 144
[22:19:49] [Server thread/CRITICAL]: "Could not pass event 'pocketmine\event\player\PlayerQuitEvent' to 'HungerGames vBuild#16': Class hungergames\lib\utils\Loader not found on hungergames\EventListener
[22:19:49] [Server thread/CRITICAL]: ClassNotFoundException: "Class hungergames\lib\utils\Loader not found" (EXCEPTION) in "/src/spl/BaseClassLoader" at line 144

I am really frustrated with this :/. What can I do? I am using this version - https://github.com/InfinityGamers/HungerGames-UPDATED/releases/download/Build%2316-API3/HungerGames_Build.16.New.API.phar

Crash

[Server thread/CRITICAL]: TypeError: "Argument 1 passed to pocketmine\plugin\PluginDescription::loadMap() must be of the type array, boolean given, called in phar://C:/Users/Kaito/Desktop/kaito php7/PocketMine-MP.phar/src/pocketmine/plugin/PluginDescription.php on line 51" (EXCEPTION) in "/src/pocketmine/plugin/PluginDescription" at line 59

now, the server crash and cant load plugin :(

failed to open stream

Warning: file_put_contents(/root/EggWars/plugins/HungerGames/messages.yml): failed to open stream: No such file or directory in /root/EggWars/src/pocketmine/utils/Config.php on line 207

Hungergames doesnt load correctly

So I created a hunger games map everything worked fine up until I tried joining
When I try joining it tp's me to one of the slots but, all it does is keep me in the spawn. There is no messages or anything it just keeps you in the slot. also /hg leave crashed server. Only way to leave is by leaving the server. Thanks for helping in advance

Illegal Offset

Warning: Illegal offset type in isset or empty in phar://C:/Users/Bobby-Foo/Documents/MCPE SQL/plugins/HungerGames.phar/src/xbeastmode/hg/tasks/MessageTask.php on line 20

Could Not Pass Event

[11:48:29] [Server thread/CRITICAL]: "Could not pass event 'pocketmine\event\player\PlayerQuitEvent' to 'HungerGames vbuild#07': Access to undeclared static property: xbeastmode\hg\HGManagement::$BBlocks on xbeastmode\hg\Events
[11:48:29] [Server thread/CRITICAL]: Error: "Access to undeclared static property: xbeastmode\hg\HGManagement::$BBlocks" (EXCEPTION) in "/HungerGames.phar/src/xbeastmode/hg/api/EndGame" at line 76

DeathMatch Issues

Only one player is TPed to deathmatch arena when it is time to. Also, game ends with two winners being broadcasted.

Popups + Messages

Could you add popups and messages on join, like "Waiting for players..." and "(player) joined the game!"?

Gamemode / items not reset?

I've been testing this on my server and noticed a couple of issues with this otherwise awesome plugin.

  1. When a user joins a HungerGames their gamemode is not automatically set to survival (therefore creative players can never be killed).
  2. Items the player has in inventory when joining a HungerGames are brought with them to the game (therefore allowing full diamond / gapple etc from the start of the game).
  3. Items gained during the HungerGames are not lost when the game ends (therefore allowing people to get items they can use in other worlds). There original inventory should be restored based upon point 2.

Hope these points will help you to fix an otherwise perfect plugin. Thank you for your time and effort in developing this :-)

Random DeathMatch

deathmatch can happen randomly even when the game has not completed..

Add economy support.

It would be awesome if when you win a game it gives you a certain amount of money, and takes some for joining. This would all be defined in the arena's config. So certain maps could cost different mony, and some free.

/hg level bug

Call to a member function setGameLevel() on null
[14:28:19] [Server thread/CRITICAL]: Error: "Call to a member function setGameLevel() on null" (EXCEPTION) in "/plugins/HungerGames-master/src/hungergames/command/HGCommand" at line 147

Build 9

  • players can move while the countdown is still on
  • map still hasn't reset ( i tried flint and steel and in the next match it still burning)
  • player wins the match although burned to death (broadcast)

Error

Yes, I compiled it with DevTools. It happened when I tap the sign.

no countdown

Elywing thread:CRITICAL > ClassNotFoundException: "Class hungergames\lib\utils\Loader not found" (EXCEPTION) in "/src/spl/BaseClassLoader" at line 144

Build 7

  • killed player is broadcasted as a winner
  • no map reset
  • sometime players are teleported to DM instead of pods

Class hungergames\Loader not found

2017-05-05 [17:57:24] �[Server thread/CRITICAL]: ClassNotFoundException: "Class hungergames\Loader not found" (EXCEPTION) in "/src/spl/BaseClassLoader" at line 144�

Items dropped in tournament do not reset.

If somebody drops items, they are not removed from the world at the end of an HG match. Players can get items from chests, drop them somewhere and store up items in the arena for subsequent HG matches.

Death Match Never Starts

All my players join fine and it shows HG has started. It shows that the deathmatch will start in three mins but it never gave a notice it started.

Can you turn off damage before the deathmatch starts?

When Is The Major Update?

I Just Wanted To Ask You About The Major Update. When Is The Major Update Is Gonna Come Out? I Already Gave You All The Ideas For The Update On YouTube. Just Asking Don't Be Mad Pls.

~ QimieGaming

Feature Request: Add /HG join command

Hello,
Could you please add a /hg join command, that would make it so I could click a slapper to join the game. This would be greatly appreciated. If you decide to add this please make it join a random game or make it so you can do /hg join

/slapper edit addcommand rca {player} hg join

TODO List

Here's the TODO list for Build#17:

  • Add Kits
  • Add GUI Kit selector
  • Add AdvancedKits support
  • Add tap-to-add-slot support
  • Add API events
  • Add Command to join game automatically
  • Add Statistics API
  • Add spectator mode
  • Optimize plugin for better performance

Moving issue

you can move before the game starts..

plugin doesn't restrict movement

error

Notice: Undefined index: Map1 in /Users/Ronny/Desktop/V9/plugins/HungerGames-master/src/xbeastmode/hg/tasks/GameTask.php on line 33

Warning: Invalid argument supplied for foreach() in /Users/Ronny/Desktop/V9/plugins/HungerGames-master/src/xbeastmode/hg/tasks/GameTask.php on line 33

HungerGame Arenas Does not load correctly.

build version 16, MCPE: 1.0.4.11, and For server software I'm using Genisys
After I created an arena following the steps that the video does I try joining the arena where the issue occurs. The server will just keep you on one of the slots I created but that's all it does. The game never starts. And /hg leave doesn't work either, just crashes server. That's the issue. I'll get the arena config in a minute.

---
sign_line_1: '&6-=&e[&fS&cG&e]&6=-'
sign_line_2: '&f{on}&f/&a{max}'
sign_line_3: '&aGame: &f{game}'
sign_line_4: '&eStatus: {status}'
is_sky_wars: "no"
min_players: 2
max_players: 12
game_seconds: 2400.000000
waiting_seconds: 10.000000
game_level: hg
refill_chest_after_seconds: 200.000000
chest_items:
- 272 0 1
- 298 0 1
- 299 0 1
- 300 0 1
- 301 0 1
lobby_pos:
  x: 127.000000
  "y": 4.000000
  z: 128.000000
  level: world
death_match_pos:
  x: 140.000000
  "y": 4.000000
  z: 150.000000
  level: world
slots:
  1:
    x: 37.544700
    "y": 148.000000
    z: 86.388200
  2:
    x: 42.535700
    "y": 148.000000
    z: 57.634000
  3:
    x: 37.487200
    "y": 148.000000
    z: 28.362600
  4:
    x: 19.645100
    "y": 148.000000
    z: 7.608700
  5:
    x: -7.732600
    "y": 148.000000
    z: -0.590900
  6:
    x: -34.289400
    "y": 148.000000
    z: 7.477200
  7:
    x: -52.692900
    "y": 148.000000
    z: 28.274100
  9:
    x: -57.671900
    "y": 148.000000
    z: 57.184200
  8:
    x: -52.611100
    "y": 148.000000
    z: 86.409700
  10:
    x: -34.698500
    "y": 148.000000
    z: 107.312800
  11:
    x: -7.374500
    "y": 148.000000
    z: 115.714400
  12:
    x: 19.435700
    "y": 148.000000
    z: 107.585000
sign_list:
  -30:79:-117:spawn: ""
...

Bug

First, thanks for the plugin

2nd: this is the bug that occurs in game https://www.youtube.com/watch?v=630gb-msqm0

3rd: Now, error in players quit:
[Server thread/CRITICAL]: "Could not pass event 'pocketmine\event\player\PlayerQuitEvent' to 'HungerGames vbuild#07': Access to undeclared static property: xbeastmode\hg\HGManagement::$BBlocks on xbeastmode\hg\Events
[16:30:12] [Server thread/CRITICAL]: Error: "Access to undeclared static property: xbeastmode\hg\HGManagement::$BBlocks" (EXCEPTION) in "/HG.phar/src/xbeastmode/hg/api/EndGame" at line 76

Auto Chest Filling

Not sure what I'm doing wrong, but this feature does not appear to be working for me. I have chests placed in the world, but they do not get filled with anything prior to a game starting.

Teleported to Lobby Just Before Death

HG tournament players seem to be teleported to the lobby just before they are killed, dying in the lobby, dropping their items in the lobby, which can then be picked up by others.

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.