示例#1
0
 @Override
 public void loadConfigs() {
   super.loadConfigs();
   ConfigModel scorebarFormat =
       new ConfigModel(
           "screenScoreBarFormat",
           "AliveAndRounds",
           "Specify here how will the player's screen Score bar look like. <br1><font color=LEVEL>Alive</font> shows the count of players that are still alive, excluding you.<br1><font color=LEVEL>Time</font> shows the time left for the event (using Run time value)<br1><font color=LEVEL>Rounds</font> shows the current round / max rounds in the event.<br1><font color=LEVEL>Top</font> shows the score of the top player in the event.<br1>Example: <font color=LEVEL>AliveAndRounds</font> will show following text: 'Alive: 12, Round: 1/3', where 12 is the count of alive players excluding you, 1 is the current round and 3 si the total count of rounds in this event (configurable).",
           ConfigModel.InputType.Enum);
   scorebarFormat.addEnumOptions(
       new String[] {
         "Alive",
         "Rounds",
         "Time",
         "Top",
         "AliveAndRounds",
         "AliveAndTime",
         "AliveAndTop",
         "RoundsAndTime",
         "RoundsAndTop",
         "TopAndTime"
       });
   this.addConfig(scorebarFormat);
   this.removeConfig("runTime");
   this.removeConfig("rejoinAfterDisconnect");
   this.removeConfig("removeWarningAfterRejoin");
   this.addConfig(
       new ConfigModel(
           "runTime",
           "30",
           "The run time of this event, launched automatically by the scheduler. Max value globally for all events is 120 minutes. <font color=699768>It is recommended to use a higher run time (30+ minutes) in combination with lower value of </font><font color=LEVEL>maxRounds</font> <font color=699768>(3-5).</font> In minutes!"));
   this.addConfig(
       new ConfigModel(
           "maxRounds",
           "3",
           "The maximum count of rounds that will be runned in this event. One round ends when there's only one player alive. If an event instance reaches this rounds limit, the event instance will end. The event ends (meaning you can start/schedule a new event) only when all event instances have ended."));
   this.addConfig(
       new ConfigModel(
           "roundTimeLimit",
           "600",
           "The time after it automatically ends current round. Useful to prevent afking on events or if any stupid player don't know what to do (even tho if a player goes afk, he will be killed automatically). In seconds."));
   this.addConfig(
       new ConfigModel(
           "scoreForRoundWinner",
           "3",
           "Number of score points given to a round winner (the only player who survived). Remember, that one kill = 1 score."));
   this.addConfig(
       new ConfigModel(
           "roundWaitTime",
           "5",
           "The time players have to wait when a new round started. They are rooted and can't attack anyone. There's a countdown too. This is here because it looks cool."));
   this.addConfig(
       new ConfigModel(
           "disableCountdown",
           "true",
           "Put true to disable classic event's end countdown announcement. Good if you want to have this event only round-based, like it ends after 3 rounds and not look like there's a 20 minutes limit. Putting high run time (eg. 30 minutes) and lower rounds count (3-5) is recommended for this event.",
           ConfigModel.InputType.Boolean));
 }
示例#2
0
 @Override
 public void initEvent() {
   super.initEvent();
   this._maxRounds = this.getInt("maxRounds");
   this._roundTimeLimit = this.getInt("roundTimeLimit");
   this._scoreForRoundWinner = this.getInt("scoreForRoundWinner");
   this._roundWaitTime = this.getInt("roundWaitTime");
   this._disableAnnouncingCountdown = this.getBoolean("disableCountdown");
   this._scorebarFormat = this.getString("screenScoreBarFormat").split("And");
 }
示例#3
0
 @Override
 public void onEventEnd() {
   if (NexusLoader.detailedDebug) {
     this.print("Event: onEventEnd()");
   }
   for (Deathmatch.DMEventInstance match : this._matches.values()) {
     if (!this.getEventData(match.getInstance().getId()).isActive()) continue;
     this.endRoundDueToEventTimeLimit(match.getInstance().getId(), true);
   }
   super.onEventEnd();
 }