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.
u mentioned Russians too, what about them? and the war has nothing to do with the topic, the guy is delaying him on purpose cuz he cant deliver anything.
I never said I hate Russians. Please read carefully.
What I meant is that, due to the ongoing war and other circumstances, I would avoid outsourcing development work to Ukrainian developers at the moment. The limited access to electricity throughout the day and the risk of being called to war at any time make it challenging for them to ensure timely delivery.
Unfortunately, working with Ukrainian developers right now can be unreliable.
Question
NuclearCitizen
Hey guys. I am trying to make my !global chat to be seen everywhere in the world. Can somebody help me with the code here?
package net.sf.l2j.gameserver.handler.chathandlers; import net.sf.l2j.gameserver.data.xml.MapRegionData; import net.sf.l2j.gameserver.enums.FloodProtector; import net.sf.l2j.gameserver.enums.SayType; import net.sf.l2j.gameserver.handler.IChatHandler; import net.sf.l2j.gameserver.model.World; import net.sf.l2j.gameserver.model.actor.Player; import net.sf.l2j.gameserver.network.serverpackets.CreatureSay; public class ChatShout implements IChatHandler { private static final SayType[] COMMAND_IDS = { SayType.SHOUT }; @Override public void handleChat(SayType type, Player player, String target, String text) { if (!player.getClient().performAction(FloodProtector.GLOBAL_CHAT)) return; final CreatureSay cs = new CreatureSay(player, type, text); final int region = MapRegionData.getInstance().getMapRegion(player.getX(), player.getY()); for (Player worldPlayer : World.getInstance().getPlayers()) { if (region == MapRegionData.getInstance().getMapRegion(worldPlayer.getX(), worldPlayer.getY())) worldPlayer.sendPacket(cs); } } @Override public SayType[] getChatTypeList() { return COMMAND_IDS; } }
2 answers to this question
Recommended Posts
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.