Hey guys, I’m working on a hunger games plugin for 1.4. I’m using events, timers, game state and player state, the usual stuff. I’ve mapped out the logic in a flow chart; everything fairly straight forward except for some of the trickier bits I’ve listed below: 1. Spectator Mode: Make Player Invisible and Unable to Interact with Objects, possibly fly, teleport to players 2. Warp players to waiting area 3. Freeze / Unfreeze Players 4. Enable / Disable PVP 5. Disable destroying the environment (but able to open chests & doors) 6. Empty and Reload Chests with Random Items 7. Reset Map If anyone has any pointers / tips or sample code on how to accomplish these, much appreciated! Thanks.
PHP: public function onEntityDamage(EntityDamageByEntityEvent $event){ if($event->getEntity()->getLevel() == "hg"){ //HG world $event->setCancelled(); /*this disable pvp, you can configure as you want, for example only when the game is not started*/ }} PHP: public function onBlockPlace(BlockPlaceEvent $event){ if($event->getPlayer()->getLevel() == "hg"){ $event->setCancelled(); //this disable placing blocks in the "hg" world }} PHP: public function onBlockBreak(BlockBreakEvent $event){ if($event->getPlayer()->getLevel() == "hg"){ $event->setCancelled(); //this disable breaking blocks in the "hg" world }} Players will be still able to use doors and chests. For this you can use signs, or a command /hg start if you like: Just disable move event before the game starts. For spectator mode, I think you should put the player in creative and turn it invisible by players that are playing. For chest refill, you can use ChestRefill plugin by @Falk. Hope this helped Will this plugin be public?
i'm trying to get a rudimentary map going - followed the instructions here but no dice. Server starts and looks OK, but when I connect with client (android, 095) stuck at "Building Terrain" screen with no progress on bar - not even after attempting to re-connect several times. I'm running Alpha_1.4dev-478_x86 Goal is to use MCEdit to build the map
i have been telling many of others to lower their view distance to the lowest toggle as possible and disable all graphics settings too to load things smoothly. this is what @shoghicp told me as i ran into the same problem getting stucked at building terrain.
Thanks for pinging the thread - I had written up some of the code, but stopped development when I realized how unstable the server was. I'm going to pick it back up when the server stabilizes.