public function onSCommand(CommandSender $c, Command $cc, $scmd, $data, array $args)
 {
     if (count($args) != 0) {
         return false;
     }
     $c->sendMessage(mc::_("Version: %1%", MPMU::version()));
     return true;
 }
Example #2
0
 public function onEnable()
 {
     $this->api = new GrabBagAPI($this);
     if (!is_dir($this->getDataFolder())) {
         mkdir($this->getDataFolder());
     }
     mc::plugin_init($this, $this->getFile());
     $this->getLogger()->info(mc::_("LibCommon v%1%", MPMU::version()));
     $features = ["players" => ["CmdPlayers", true], "ops" => ["CmdOps", true], "gm?" => ["CmdGmx", true], "as" => ["CmdAs", true], "slay" => ["CmdSlay", true], "heal" => ["CmdHeal", true], "whois" => ["CmdWhois", true], "mute-unmute" => ["CmdMuteMgr", true], "freeze-thaw" => ["CmdFreezeMgr", true], "showtimings" => ["CmdTimings", true], "seeinv-seearmor" => ["CmdShowInv", true], "clearinv" => ["CmdClearInv", true], "get" => ["CmdGet", true], "shield" => ["CmdShieldMgr", true], "srvmode" => ["CmdSrvModeMgr", true], "opms-rpt" => ["CmdOpMsg", true], "entities" => ["CmdEntities", true], "after-at" => ["CmdAfterAt", true], "summon-dismiss" => ["CmdSummon", true], "pushtp-poptp" => ["CmdTpStack", true], "prefix" => ["CmdPrefixMgr", true], "spawn" => ["CmdSpawn", true], "burn" => ["CmdBurn", true], "blowup" => ["CmdBlowUp", true], "setarmor" => ["CmdSetArmor", true], "spectator" => ["CmdSpectator", false], "followers" => ["CmdFollowMgr", true], "rcon-client" => [["ServerList", "CmdRcon"], true], "join-mgr" => ["JoinMgr", true], "custom-death" => ["CustomDeath", true], "repeater" => ["RepeatMgr", true], "broadcast-tp" => ["BcTpMgr", true], "crash" => ["CmdCrash", true], "pluginmgr" => ["CmdPluginMgr", true], "permmgr" => ["CmdPermMgr", true], "throw" => ["CmdThrow", true], "regmgr" => ["CmdRegMgr", true], "invisible" => ["CmdInvisible", true], "chat-utils" => ["CmdChatMgr", true], "query-hosts" => [["ServerList", "CmdQuery"], true], "cmd-selector" => ["CmdSelMgr", true], "cmd-alias" => ["CmdAlias", true], "reop" => ["CmdReOp", true], "tprequest" => ["CmdTpRequest", false], "homes" => ["CmdHomes", false], "warps" => ["CmdWarp", false], "motd-task" => [["ServerList", "MotdDaemon"], false], "query-task" => [["ServerList", "QueryDaemon"], false], "merge-slots" => [["ServerList", "MegaSlots"], false], "echo" => ["CmdEcho", true], "onevent-cmd" => ["CmdOnEvent", false], "pmscripts" => ["CmdRc", true], "event-tracer" => ["CmdTrace", false], "iteminfo" => ["CmdItemInfo", true], "plenty" => ["CmdPlenty", true], "wall" => [["ServerList", "CmdWall"], true], "afk" => ["CmdAFK", true], "xyz" => ["CmdXyz", true], "tptop" => ["CmdTpTop", true], "tpback" => ["CmdTpBack", true], "near" => ["CmdNear", true], "chat-scribe" => ["CmdSpy", true]];
     if (MPMU::apiVersion("1.12.0")) {
         $features["fly"] = ["CmdFly", true];
         $features["skinner"] = ["CmdSkinner", true];
         $features["blood-particles"] = ["BloodMgr", true];
         $ft = $this->getServer()->getPluginManager()->getPlugin("FastTransfer");
         if ($ft) {
             $features["broadcast-ft"] = ["TransferMgr", true];
             $features["ftservers"] = [["ServerList", "CmdFTServers"], true];
         }
     }
     $cfg = $this->modConfig(__NAMESPACE__, $features, ["version" => $this->getDescription()->getVersion(), "serverlist" => [], "join-mgr" => JoinMgr::defaults(), "broadcast-tp" => BcTpMgr::defaults(), "custom-death" => CustomDeath::defaults(), "freeze-thaw" => CmdFreezeMgr::defaults(), "cmd-selector" => CmdSelMgr::defaults(), "query-task" => QueryDaemon::defaults(), "motd-task" => MotdDaemon::defaults(), "chat-scribe" => CmdSpy::defaults()]);
 }
Example #3
0
 public function onCommand(CommandSender $sender, Command $cmd, $label, array $args)
 {
     $sender->sendMessage("libcommon v" . MPMU::version());
     return true;
 }
Example #4
0
 /**
  * Provides the library version
  * @return str
  */
 public function api()
 {
     return MPMU::version();
 }
Example #5
0
 /**
  * Currently un-implemented
  */
 public function getVars()
 {
     if ($this->vars === null) {
         $this->vars = new ExpandVars($this->plugin);
         $this->vars->define("{GrabBag}", $this->plugin->getDescription()->getVersion());
         $this->vars->define("{libcommon}", MPMU::version());
     }
     return $this->vars;
 }