Addition of OnServerStart event.
This commit is contained in:
		@@ -145,6 +145,8 @@ import org.l2jmobius.gameserver.instancemanager.games.Lottery;
 | 
			
		||||
import org.l2jmobius.gameserver.instancemanager.games.MonsterRace;
 | 
			
		||||
import org.l2jmobius.gameserver.model.World;
 | 
			
		||||
import org.l2jmobius.gameserver.model.events.EventDispatcher;
 | 
			
		||||
import org.l2jmobius.gameserver.model.events.EventType;
 | 
			
		||||
import org.l2jmobius.gameserver.model.events.impl.OnServerStart;
 | 
			
		||||
import org.l2jmobius.gameserver.model.olympiad.Hero;
 | 
			
		||||
import org.l2jmobius.gameserver.model.olympiad.Olympiad;
 | 
			
		||||
import org.l2jmobius.gameserver.network.ClientNetworkManager;
 | 
			
		||||
@@ -415,6 +417,11 @@ public class GameServer
 | 
			
		||||
			CustomMailManager.getInstance();
 | 
			
		||||
		}
 | 
			
		||||
		
 | 
			
		||||
		if (EventDispatcher.getInstance().hasListener(EventType.ON_SERVER_START))
 | 
			
		||||
		{
 | 
			
		||||
			EventDispatcher.getInstance().notifyEventAsync(new OnServerStart());
 | 
			
		||||
		}
 | 
			
		||||
		
 | 
			
		||||
		PunishmentManager.getInstance();
 | 
			
		||||
		
 | 
			
		||||
		Runtime.getRuntime().addShutdownHook(Shutdown.getInstance());
 | 
			
		||||
 
 | 
			
		||||
@@ -19,6 +19,7 @@ package org.l2jmobius.gameserver.model.events;
 | 
			
		||||
import org.l2jmobius.commons.util.CommonUtil;
 | 
			
		||||
import org.l2jmobius.gameserver.model.events.impl.IBaseEvent;
 | 
			
		||||
import org.l2jmobius.gameserver.model.events.impl.OnDayNightChange;
 | 
			
		||||
import org.l2jmobius.gameserver.model.events.impl.OnServerStart;
 | 
			
		||||
import org.l2jmobius.gameserver.model.events.impl.clan.OnClanWarFinish;
 | 
			
		||||
import org.l2jmobius.gameserver.model.events.impl.clan.OnClanWarStart;
 | 
			
		||||
import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureAttack;
 | 
			
		||||
@@ -276,14 +277,16 @@ public enum EventType
 | 
			
		||||
	// Trap events
 | 
			
		||||
	ON_TRAP_ACTION(OnTrapAction.class, void.class),
 | 
			
		||||
	
 | 
			
		||||
	ON_DAY_NIGHT_CHANGE(OnDayNightChange.class, void.class),
 | 
			
		||||
	
 | 
			
		||||
	// Instance events
 | 
			
		||||
	ON_INSTANCE_CREATED(OnInstanceCreated.class, void.class),
 | 
			
		||||
	ON_INSTANCE_DESTROY(OnInstanceDestroy.class, void.class),
 | 
			
		||||
	ON_INSTANCE_ENTER(OnInstanceEnter.class, void.class),
 | 
			
		||||
	ON_INSTANCE_LEAVE(OnInstanceLeave.class, void.class),
 | 
			
		||||
	ON_INSTANCE_STATUS_CHANGE(OnInstanceStatusChange.class, void.class);
 | 
			
		||||
	ON_INSTANCE_STATUS_CHANGE(OnInstanceStatusChange.class, void.class),
 | 
			
		||||
	
 | 
			
		||||
	// Server events
 | 
			
		||||
	ON_SERVER_START(OnServerStart.class, void.class),
 | 
			
		||||
	ON_DAY_NIGHT_CHANGE(OnDayNightChange.class, void.class);
 | 
			
		||||
	
 | 
			
		||||
	private final Class<? extends IBaseEvent> _eventClass;
 | 
			
		||||
	private final Class<?>[] _returnClass;
 | 
			
		||||
 
 | 
			
		||||
@@ -0,0 +1,35 @@
 | 
			
		||||
/*
 | 
			
		||||
 * This file is part of the L2J Mobius project.
 | 
			
		||||
 * 
 | 
			
		||||
 * This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 * it under the terms of the GNU General Public License as published by
 | 
			
		||||
 * the Free Software Foundation, either version 3 of the License, or
 | 
			
		||||
 * (at your option) any later version.
 | 
			
		||||
 * 
 | 
			
		||||
 * This program is distributed in the hope that it will be useful,
 | 
			
		||||
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
			
		||||
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 | 
			
		||||
 * General Public License for more details.
 | 
			
		||||
 * 
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 */
 | 
			
		||||
package org.l2jmobius.gameserver.model.events.impl;
 | 
			
		||||
 | 
			
		||||
import org.l2jmobius.gameserver.model.events.EventType;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @author Mobius
 | 
			
		||||
 */
 | 
			
		||||
public class OnServerStart implements IBaseEvent
 | 
			
		||||
{
 | 
			
		||||
	public OnServerStart()
 | 
			
		||||
	{
 | 
			
		||||
	}
 | 
			
		||||
	
 | 
			
		||||
	@Override
 | 
			
		||||
	public EventType getType()
 | 
			
		||||
	{
 | 
			
		||||
		return EventType.ON_SERVER_START;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user