Jump to content

Recommended Posts

Posted

/*
* 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 com.l2jfrozen.gameserver.model.entity;

import com.l2jfrozen.Config;
import com.l2jfrozen.gameserver.model.L2World;
import com.l2jfrozen.gameserver.thread.ThreadPoolManager;



/**
* 
* @author Debian
*
*/

public class AnnounceOnlinePlayers
{
    public static void getInstance()
    {
        ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new Runnable()
        {
            @Override
            public void run()
            {
                Announce();
            }
        }, 0,Config.ANNOUNCE_ONLINE_PLAYERS_DELAY * 1000);
     }
    
    public static void Announce()
    {
        int NumberofPlayers = L2World.getInstance().getAllPlayers().size();

        if (NumberofPlayers == 1)
            Announcements.getInstance().announceToAll(NumberofPlayers + " player is online.");
        else
            Announcements.getInstance().announceToAll(NumberofPlayers + " players are online.");
    }
}

Code Fixed For L2JFrozen

Posted

/*
* 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 com.l2jfrozen.gameserver.model.entity;

import com.l2jfrozen.Config;
import com.l2jfrozen.gameserver.model.L2World;
import com.l2jfrozen.gameserver.thread.ThreadPoolManager;



/**
* 
* @author Debian
*
*/

public class AnnounceOnlinePlayers
{
    public static void getInstance()
    {
        ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new Runnable()
        {
            @Override
            public void run()
            {
                Announce();
            }
        }, 0,Config.ANNOUNCE_ONLINE_PLAYERS_DELAY * 1000);
     }
    
    public static void Announce()
    {
        int NumberofPlayers = L2World.getInstance().getAllPlayers().size();

        if (NumberofPlayers == 1)
            Announcements.getInstance().announceToAll(NumberofPlayers + " player is online.");
        else
            Announcements.getInstance().announceToAll(NumberofPlayers + " players are online.");
    }
}

Code Fixed For L2JFrozen

 

Thanks !!!  :gusta:  :gusta:  :gusta:

  • 3 years later...
Posted

AnnounceOnlinePlayers.java

package net.sf.l2j.gameserver.model.entity;

import net.sf.l2j.commons.concurrent.ThreadPool;

import net.sf.l2j.Config;
import net.sf.l2j.gameserver.model.World;
import net.sf.l2j.gameserver.util.Broadcast;

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().getPlayers().size();
		
		if (NumberofPlayers == 1)
			Broadcast.announceToOnlinePlayers(NumberofPlayers + " player is online.");
		else
			Broadcast.announceToOnlinePlayers(NumberofPlayers + " player are online.");
	}
}
  • 2 months later...
Posted

Can be shortcuted to:

ThreadPool.scheduleAtFixedRate(() -> Broadcast.announceToOnlinePlayers(World.getInstance().getPlayers().size() + " online player(s)."), 0, Config.ANNOUNCE_ONLINE_PLAYERS_DELAY * 1000);

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Posts

    • Yes, I have no problem going that route either. I've already done business with a couple of people and always paid. Thank you for your concern and for protecting the community from scammers. cheers. K
    • For many Elden Ring players, especially those short on time or seeking a specific build, buying items online has become a practical and time-saving solution. However, as someone who’s made that choice multiple times, I know firsthand that not all sellers are legitimate—and the risk of losing your money, or worse, getting banned, is real. Through trial and error, and countless hours in the community, I’ve discovered five proven methods to help players like you find authentic Elden Ring items to buy—safely, efficiently, and without risking your account. Here’s how to make sure you’re getting exactly what you need, the right way. 1. Choose Platforms That Guarantee Elden Ring Items Without Ban The number one concern when you buy Elden Ring items is avoiding account penalties. I've personally used platforms that explicitly promote delivery methods aligned with FromSoftware’s guidelines—like safe in-game drops, no cheats, and no modded content. Look for sellers or marketplaces that guarantee you’ll receive elden ring items without ban risk. If that promise isn’t clear or backed by community trust, move on. One time, I made the mistake of buying from an unverified Discord seller—within a week, I saw strange behavior on my account and had to delete my save file. Lesson learned: stick with professional services that know what they’re doing. 2. Rely on Established Marketplaces with Verified Reviews Always look for buyer feedback and real user ratings. Reputable platforms will have a track record of successful transactions and transparent customer experiences. I tend to avoid any site or seller that hides feedback or has a generic, incomplete website. The platforms I trust most let users post detailed reviews and show proof of item delivery—usually with timestamps and screenshots. That added layer of transparency gave me peace of mind the first time I placed an order, and it’s been part of my decision-making ever since. 3. Start with a Small Order to Test Reliability If you’re uncertain, try a small purchase first. This was my approach when I first decided to buy Elden Ring items. I ordered just a few smithing stones to upgrade a secondary weapon and see how the process worked. The seller delivered in under 10 minutes, and the transaction went smoothly. That small step helped build trust, and I gradually scaled up future purchases for full armor sets and talismans. It’s the smartest way to gauge service quality without taking a big risk up front.  [url=https://www.u4gm.com/elden-ring-items][img]https://i.pinimg.com/736x/9d/7d/d4/9d7dd41fc381c64fe9b93e5c11584513.jpg [/img][/url]   4. Confirm Safe Delivery Methods (No Bots or Cheats) Authentic sellers will provide clear instructions on how the item delivery will happen—usually through password-protected multiplayer sessions where they drop items directly to your character. That’s how I’ve received every safe delivery so far. If a seller talks about instant “mailing,” bots, or strange back-end tools, that’s a red flag. Those methods are often tied to bans or corrupted saves. Look for sellers who mention manual delivery, cooperative drops, or private session coordination—these methods are the standard for getting elden ring items without ban issues. 5. Ask for Live Support or Communication Options Good sellers are responsive, offer live chat, or message confirmations. I once had a situation where I accidentally gave the wrong character name for delivery. Thanks to a quick reply from customer support, they corrected it instantly. If a seller isn’t responsive or has no support at all, that’s a sign they may disappear after you’ve paid. A platform with clear customer service builds trust and shows professionalism—especially helpful if you’re new to the process.   There’s nothing wrong with wanting to buy Elden Ring items to save time or explore new builds. I’ve done it several times, and when done correctly, it can genuinely enhance the game without ruining the experience. But your safety comes first. By following these five proven methods, you can make sure the items you receive are legitimate, safe, and won’t get your account flagged. Always prioritize platforms that clearly offer elden ring items without ban risk, and when in doubt—start small, ask questions, and trust your instincts. How to Earn Fast: Buy Elden Ring Items Safely – No Risk of Ban
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock