Addition of OlympiadEnabled configuration.
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
package ai.others.MonumentOfHeroes;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.util.CommonUtil;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
@@ -57,8 +58,11 @@ public class MonumentOfHeroes extends AbstractNpcAI
|
||||
|
||||
private MonumentOfHeroes()
|
||||
{
|
||||
addStartNpc(MONUMENTS);
|
||||
addTalkId(MONUMENTS);
|
||||
if (Config.OLYMPIAD_ENABLED)
|
||||
{
|
||||
addStartNpc(MONUMENTS);
|
||||
addTalkId(MONUMENTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
package handlers.usercommandhandlers;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.gameserver.handler.IUserCommandHandler;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
@@ -37,6 +38,12 @@ public class OlympiadStat implements IUserCommandHandler
|
||||
@Override
|
||||
public boolean useUserCommand(int id, Player player)
|
||||
{
|
||||
if (!Config.OLYMPIAD_ENABLED)
|
||||
{
|
||||
player.sendPacket(SystemMessageId.THE_GRAND_OLYMPIAD_GAMES_ARE_NOT_CURRENTLY_IN_PROGRESS);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (id != COMMAND_IDS[0])
|
||||
{
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user