Merge branch 'feature/moba' into develop
This commit is contained in:
commit
27f5da06f4
@ -219,7 +219,7 @@ public enum AchievementCategory
|
||||
new StatDisplay[] {StatDisplay.KILLS, StatDisplay.GEMS_EARNED, StatDisplay.fromGame("Quests Completed", GameDisplay.GemHunters, "QuestsCompleted"), StatDisplay.fromGame("Chests Opened", GameDisplay.GemHunters, "ChestsOpened")},
|
||||
Material.EMERALD, 0, GameCategory.SURVIVAL, null, false, GameDisplay.GemHunters.getGameId()),
|
||||
|
||||
MOBA("Heroes Of Gwen", null,
|
||||
MOBA("Heroes of GWEN", null,
|
||||
new StatDisplay[] {StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.GEMS_EARNED, null, StatDisplay.fromGame("Gold Earned", GameDisplay.MOBA, "GoldEarned")},
|
||||
Material.PRISMARINE_SHARD, 0, GameCategory.CLASSICS, null, false, GameDisplay.MOBA.getGameId());
|
||||
|
||||
|
@ -10,6 +10,7 @@ import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.disguise.disguises.DisguiseBase;
|
||||
import mineplex.core.disguise.disguises.DisguisePlayer;
|
||||
import mineplex.core.leaderboard.Leaderboard;
|
||||
import mineplex.core.leaderboard.LeaderboardManager;
|
||||
import mineplex.core.leaderboard.LeaderboardRepository.LeaderboardSQLType;
|
||||
@ -187,10 +188,6 @@ public class Moba extends TeamGame
|
||||
case Live:
|
||||
writeLive(player, scoreboard);
|
||||
break;
|
||||
case End:
|
||||
case WinRoom:
|
||||
writeEnd(player, scoreboard);
|
||||
break;
|
||||
}
|
||||
})
|
||||
.setPrefix((perspective, subject) ->
|
||||
@ -416,15 +413,6 @@ public class Moba extends TeamGame
|
||||
scoreboard.write(UtilTime.MakeStr(System.currentTimeMillis() - GetStateTime()));
|
||||
}
|
||||
|
||||
private void writeEnd(Player player, GameScoreboard scoreboard)
|
||||
{
|
||||
scoreboard.writeNewLine();
|
||||
|
||||
scoreboard.write("Game Over");
|
||||
|
||||
scoreboard.writeNewLine();
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.LOWEST)
|
||||
public void prepare(GameStateChangeEvent event)
|
||||
{
|
||||
@ -499,7 +487,7 @@ public class Moba extends TeamGame
|
||||
{
|
||||
for (Player player : otherTeam.GetPlayers(true))
|
||||
{
|
||||
AddGems(player, 10, "Participation", true, true);
|
||||
AddGems(player, 10, "Participation", false, false);
|
||||
}
|
||||
|
||||
if (team.equals(otherTeam))
|
||||
@ -509,7 +497,7 @@ public class Moba extends TeamGame
|
||||
|
||||
for (Player player : otherTeam.GetPlayers(true))
|
||||
{
|
||||
AddGems(player, 20, "Winning", true, true);
|
||||
AddGems(player, 20, "Winning", false, false);
|
||||
}
|
||||
|
||||
AnnounceEnd(otherTeam);
|
||||
@ -575,7 +563,7 @@ public class Moba extends TeamGame
|
||||
@EventHandler
|
||||
public void end(GameStateChangeEvent event)
|
||||
{
|
||||
if (event.GetState() != GameState.End)
|
||||
if (event.GetState() != GameState.End && event.GetState() != GameState.Dead)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -584,7 +572,7 @@ public class Moba extends TeamGame
|
||||
{
|
||||
DisguiseBase disguise = Manager.GetDisguise().getActiveDisguise(player);
|
||||
|
||||
if (disguise != null)
|
||||
if (disguise != null && disguise instanceof DisguisePlayer)
|
||||
{
|
||||
Manager.GetDisguise().undisguise(disguise);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user