Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Inactive ColorMatch 1.1.2

ColorMatch minigame inspired by WoolJumper

  1. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
  2. TheWayder174
    Offline

    TheWayder174 New Member

    Joined:
    Aug 4, 2015
    Posts:
    1
    Minecraft User:
    TheWayder174
    Can I Make A vid for you? i Got this plugin down
  3. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    Yes but i share only one
  4. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
  5. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
  6. djpecraft
    Offline

    djpecraft New Member

    Joined:
    Oct 18, 2014
    Posts:
    16
    Minecraft User:
    jbgjbg222
    i receive this error when i use /cm join
    [CRITICAL] Unhandled exception executing command 'cm join ColorMatch' in cm: Undefined index: ColorMatch
    23:20:37 [NOTICE] ArrayOutOfBoundsException: "Undefined index: ColorMatch" (E_NOTICE) in "/ColorMatch_v1.1.1.phar/src/ColorMatch/ColorMatch" at line 236
  7. JoshCreations
    Offline

    JoshCreations New Member

    Joined:
    Jul 5, 2015
    Posts:
    3
    Minecraft User:
    Josh12345
    There is a bug when you fall out of the arena and get teleported to you to spawn the plugin still thinks your in the game.
  8. FaanMaario
    Offline

    FaanMaario Active Member

    Joined:
    Jan 4, 2015
    Posts:
    65
    Minecraft User:
    FaanMaario
    Hi,
    The command, When the game is finished, doesn't appears. But all works fine :)
    Last edited: Aug 5, 2015
  9. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    @Creeperface
    PHP:
    public function onPlayerDeath(PlayerDeathEvent $event){
    $player $event->getPlayer();
    if(
    $this->getPlayerMode($player) === 1){
    $this->kickPlayer($player"Game over");
    return 
    true;
    }
    }
    FaanMaario likes this.
  10. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    What command?
  11. FaanMaario
    Offline

    FaanMaario Active Member

    Joined:
    Jan 4, 2015
    Posts:
    65
    Minecraft User:
    FaanMaario
    This line on language file:

    #end game message
    #create new line using "\n"
    end_game: "&6&l-------------&r\n&5partie %1 fini \n&4scores:\n&a1. %2\n&e2. %3\n&c3. %4\n&6&l----------------"
  12. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    @Creeperface
    PHP:
      public function registerEconomy(){
      
    $economy = ["EconomyAPI""PocketMoney""MassiveEconomy""GoldStd"];
      foreach(
    $economy as $plugin){
      
    $ins $this->getServer()->getPluginManager()->getPlugin($plugin);
      if(
    $ins instanceof Plugin && $ins->isEnabled()){
      
    $this->economy $ins;
      
    $this->getServer()->getLogger()->info("Selected economy plugin: $plugin");
     
    // return;
    break; // for loops better use break
      
    }
      }
      
    $this->economy null;
      }
    PHP:
    public function broadcastResults(){
      if(
    $this->plugin->getServer()->getPlayer($this->winners[1]) instanceof Player){
      
    $this->giveReward($this->plugin->getServer()->getPlayer($this->winners[1]));
      
    $this->plugin->getServer()->getPluginManager()->callEvent($event = new PlayerWinArenaEvent($this->plugin$this->plugin->getServer()->getPlayer($this->winners[1]), $this));
      }
      if(!isset(
    $this->winners[1])) $this->winners[1] = "---";
      if(!isset(
    $this->winners[2])) $this->winners[2] = "---";
      if(!isset(
    $this->winners[3])) $this->winners[3] = "---";
      
    $vars = ['%1''%2''%3''%4'];
      
    $replace = [$this->id$this->winners[1], $this->winners[2], $this->winners[3]];
      
    $msg str_replace($vars$replace$this->plugin->getMsg('end_game'));
      
    $levels explode(","$this->data['arena']['finish_msg_levels']);
      foreach(
    $levels as $level){
      
    $lvl $this->plugin->getServer()->getLevelByName($level);
      if(
    $lvl instanceof Level){
      foreach(
    $lvl->getPlayers() as $p){
      
    $p->sendMessage($msg);
      }
      }
      }
      }
    I dont see any code that will broadcast message from language file.
  13. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    Ok i found problem
    PHP:
      public function stopGame(){
      
    $this->unsetAllPlayers(); // <-- switch me with
      
    $this->game 0;
      
    $this->broadcastResults(); // me
      
    $this->winners = [];
      
    $this->resetFloor();
      }
    You unset all players then broadcastResults(); doesnt send message! Fix: replace them with places
    Last edited: Aug 5, 2015
    FaanMaario likes this.
  14. FaanMaario
    Offline

    FaanMaario Active Member

    Joined:
    Jan 4, 2015
    Posts:
    65
    Minecraft User:
    FaanMaario
    Thanks but how I do that? :)
  15. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    You edit source by yourself or wait for @Creeperface to update it.
    FaanMaario likes this.
  16. FaanMaario
    Offline

    FaanMaario Active Member

    Joined:
    Jan 4, 2015
    Posts:
    65
    Minecraft User:
    FaanMaario
    I think I should wait for @Creeperface to update it, because I'm not able to do that by myself x)
  17. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    It's easy:
    1. Download DevTools plugin
    2. Download (if not exists) ColorMatch minigame (this plugin)
    3. Run server
    4. Make sure both plugins have loaded succesfuly!
    5. Now open console and type in
    Code:
    extractplugin ColorMatch
    
    6. Now go to ~/plugins/DevTools/ColorMatch
    7. Cut it and paste into plugins folder
    8. Delete ColorMatch.phar (You wont be needing it anymore)
    9. Now go to ~/plugins/ColorMatch_v1.1.1/src/ColorMatch/ColorMatch.php (Open with text/code editor)
    10. Press CTRL + F and search for "public function stopGame"
    11. Now switch:
    PHP:
    public function stopGame(){
    $this->unsetAllPlayers(); // <-- switch me with
    $this->game 0;
    $this->broadcastResults(); // me
    $this->winners = [];
    $this->resetFloor();
     }
    11. Save
    12. Run server
    13. Make sure source code of ColorMatch has loaded succesfuly
    14. Execute command: makeplugin ColorMatch
    15. Stop server
    16. go to ~/plugins/DevTools and copy ColorMatch.phar and replace it with folder inside ~/plugins


    Whoallaaa :)
    FaanMaario likes this.
  18. FaanMaario
    Offline

    FaanMaario Active Member

    Joined:
    Jan 4, 2015
    Posts:
    65
    Minecraft User:
    FaanMaario
    Thanks but I can't type the first command on console xD
  19. JackboyPlay
    Offline

    JackboyPlay Active Member

    Joined:
    Apr 25, 2015
    Posts:
    507
    Minecraft User:
    JackboyPlay
    @Creeperface can you add kits example: speed 1 kit cost 200 coins and so on...
  20. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    That command can be executed as player too
    FaanMaario likes this.

Share This Page

Advertisement