Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: net.sf.l2j;Config.JAVA
- ===================================================================
- --- net.sf.l2j;Config.JAVA (revision)
- +++ net.sf.l2j;Config.JAVA (working copy)
- + /** Announce Online Players */
- + public static boolean ALLOW_ANNOUNCE_ONLINE_PLAYERS;
- + public static int ANNOUNCE_ONLINE_PLAYERS_DELAY;
- +
- + ALLOW_ANNOUNCE_ONLINE_PLAYERS = Boolean.parseBoolean(aCis.getProperty("AllowAnnounceOnlinePlayers", "True"));
- + ANNOUNCE_ONLINE_PLAYERS_DELAY = Integer.parseInt(aCis.getProperty("AnnounceOnlinePlayersDelay", "300"));
- Index: Dev.announcerTopPlayer;AnnounceOnlinePlayers.JAVA
- ===================================================================
- --- Dev.announcerTopPlayer;AnnounceOnlinePlayers.JAVA (revision)
- +++ Dev.announcerTopPlayer;AnnounceOnlinePlayers.JAVA (working copy)
- +package Dev.announcerTopPlayer;
- +
- +import net.sf.l2j.commons.concurrent.ThreadPool;
- +
- +import net.sf.l2j.Config;
- +
- +import net.sf.l2j.gameserver.model.World;
- +
- +/**
- + *
- + * @author Juvenil Walker
- + *
- + */
- +
- +public class AnnounceOnlinePlayers
- +{
- + public static void getInstance()
- + {
- + ThreadPool.scheduleAtFixedRate(new Runnable()
- + {
- + @Override
- + public void run()
- + {
- + Announce();
- + }
- + }, 0,Config.ANNOUNCE_ONLINE_PLAYERS_DELAY * 1000);
- + }
- +
- + protected static void Announce()
- + {
- + int NumberofPlayers = World.getInstance().getAllPlayers().size();
- +
- + if (NumberofPlayers == 1)
- + World.announceToOnlinePlayers("Record " + NumberofPlayers + " player is online.");
- + else
- + World.announceToOnlinePlayers("Record " + NumberofPlayers + " player are online.");
- + }
- +
- +
- +
- + }
- +
- Index: net.sf.l2j.gameserver;GameServer.JAVA
- ===================================================================
- --- net.sf.l2j.gameserver;GameServer.JAVA (revision)
- +++ net.sf.l2j.gameserver;GameServer.JAVA (working copy)
- + import Dev.announcerTopPlayer.AnnounceOnlinePlayers;
- + if (Config.ALLOW_ANNOUNCE_ONLINE_PLAYERS)
- + AnnounceOnlinePlayers.getInstance();
- Index: gameserver.config.aCis.aCis.properties
- ===================================================================
- --- gameserver.config.aCis.aCis.properties (revision)
- +++ gameserver.config.aCis.aCis.properties (working copy)
- +#Announcer all player online
- +AllowAnnounceOnlinePlayers = true
- +#Defalt 300 = 5 Minutos
- +AnnounceOnlinePlayersDelay = 300
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement