Jump to content

Question

Posted

Hi, I'm recently using an l2jserver project and I noticed something, why does every L2j project hide warnings instead of modifying the system? I have looked at java updates 1.8 to 11, 12, 14 and 15 whenever there is a java update, it always adds a warn ocut. Wouldn't that directly affect project performance with code leaks?

Recommended Posts

  • 0
Posted (edited)
22 hours ago, xdem said:

what is the performance impact on an unclosed connection ? - none closes when gets out of scope

This one is only guaranteed if you're using try-with-resources btw. In some cases they will eventually close because they will get forced by the GC (even though they are unmanaged, the JVM will try to close when possible before disposing) but it's not guaranteed and they can cause socket exhaustion.

Edited by Elfocrash
  • 1
Posted
On 6/5/2021 at 8:14 PM, iTopZ said:

for your project it can be the only one example he is right, if he was able to make a proper argument or make an absolute statement while not trying to be a clowwn, i've also made a statement for the sunrise as example of hidden warnings, those you mention have no impact on speed code leaks or to begin with.

Well, the initial post was about "all" types of "errors". Until you speak about "performance" "errors" (which actually can have an impact and should be set to at least "warning", and whom 99,99% packs normally already use them), it's all about how a developer (or pack owner)  would "feel" Java. Nothing more.

 

I *personally* "hide" "errors" which got no point, are impossible to fulfill due to the very nature of the content, etc. You probably can "fix" all "errors" from Eclipse, but since you don't get any XBox achievement for that, I don't see a point someone would do that.

 

About xdem, pick what it is needed to be picked in his answer (and mine), throw the leftover, and move on. You shouldn't feel offended about what could say an internet randomer (xdem, me or another) to you.

  • Like 1
  • 0
Posted
43 minutes ago, Williams said:

Hi, I'm recently using an l2jserver project and I noticed something, why does every L2j project hide warnings instead of modifying the system? I have looked at java updates 1.8 to 11, 12, 14 and 15 whenever there is a java update, it always adds a warn ocut. Wouldn't that directly affect project performance with code leaks?

yes if you see the shared sunrise project there is a review:

so... this guy who "made" this pack is making money from noobs, now there is another guy vilmis who's selling l2jfrozen pack 

 

this guys have in common that they scam noobs to get their money simple as that, decent packs are acis, l2jserver, lucera, mobius in this order, with them updating stuff is most possible you wont find any code leaks or performance issues, and to answer your question they dont know how to upgrade or what to upgrade this guys dont even know how to read java manuals or stay updated but scaming money from noobs is easier.

 

hope to answer your question.

PS same goes for l2scripts but still there are people who pay 2k euro to get it.

 

  • 0
Posted
3 minutes ago, iTopZ said:

sim, se você ver o projeto do nascer do sol compartilhado há uma revisão:

Então... esse cara que "fez" este pacote está ganhando dinheiro com noobs, agora há outro cara vilmis que está vendendo pacote l2jfrozen

 

esses caras têm em comum que eles scam noobs para obter o seu dinheiro simples como isso, pacotes decentes são acis, l2jserver, lucera, mobius nesta ordem, com eles atualizando coisas é mais possível você não vai encontrar quaisquer vazamentos de código ou problemas de desempenho, e para responder a sua pergunta eles não sabem como atualizar ou o que atualizar esses caras nem sequer sabem como ler manuais java ou ficar atualizado, mas scaming dinheiro de noobs é mais fácil.

 

espero responder a sua pergunta.

PS mesmo vale para l2scripts, mas ainda há pessoas que pagam 2k euros para obtê-lo.

 

 

aCis is very good yes but it uses the same procedure in aCis in revision 381 you can see that the TK ignores the java warnings.

  • 0
Posted
1 minute ago, Williams said:

 

aCis is very good yes but it uses the same procedure in aCis in revision 381 you can see that the TK ignores the java warnings.

i am not following their updates sorry but if you think you can do something about it they accept patches or talk with him he is reasonable some times, but you seem familiarized with the projects so i guess you know who is making and what all this years 🙂

  • 0
Posted
10 hours ago, Williams said:

Hi, I'm recently using an l2jserver project and I noticed something, why does every L2j project hide warnings instead of modifying the system? I have looked at java updates 1.8 to 11, 12, 14 and 15 whenever there is a java update, it always adds a warn ocut. Wouldn't that directly affect project performance with code leaks?

 

Because all project owners are amateurs and they can only add shared code, rename classes and modify in a bad way a code to bypass a null exception instead of do a core fix (i don't blame them, it's not like they get money). 

 

If you see connections or buffer readers in try catch instead of inside the  parenthesis of it for instance, run away. Closeable interface is made in Java 7 yet they still write code in a leakable way. 

  • 0
Posted
20 minutes ago, Kara said:

 

Because all project owners are amateurs and they can only add shared code, rename classes and modify in a bad way a code to bypass a null exception instead of do a core fix (i don't blame them, it's not like they get money). 

 

If you see connections or buffer readers in try catch instead of inside the  parenthesis of it for instance, run away. Closeable interface is made in Java 7 yet they still write code in a leakable way. 

The only project that fixed this was l2jserver. I will start fixing this for my server. I was looking at aCis and even Mobius they have the same problem.

  • 0
Posted
17 minutes ago, Williams said:

The only project that fixed this was l2jserver. I will start fixing this for my server. I was looking at aCis and even Mobius they have the same problem.

Mobius? You believe a guy who own 50 project at the same time and all get the same fix by L2J server when they release? 

  • Haha 1
  • 0
Posted
2 minutes ago, Kara said:

Mobius? Você acredita que um cara que possui 50 projetos ao mesmo tempo e todos recebem a mesma correção pelo servidor L2J quando eles liberam?

i expected more from aCis but they sweep the house and throw the trash under the carpet kkkk

  • 0
Posted
33 minutes ago, Williams said:

i expected more from aCis but they sweep the house and throw the trash under the carpet kkkk

 

Tryskell is what we call experienced in theory, bad in practice. 70% of his commits are rename of class. 

 

The funny part when i enter a client's PC and i need to guess how player class is named.

L2PcInstance? PcInstance? Player? PlayableInstance? This is what "developers" are doing nowadays. 

 

The most experienced team were L2J but now they suck. All serious member left and the leftover are amateur trash kids who leech my codes and add them in their project. 3 months now they add a over-complicated dynamic html scheme buffer and my discord bot. 

  • 0
Posted
16 hours ago, iTopZ said:

@Tryskell i believe you should give your answer to this

I'm using Eclipse 2019-12, those enum warnings don't exist, and I will eventually edit my environnement when next Java LTS is reached.

 

Some warnings are eventually hidden because they got no real point to be activated (I notably think about the switch "default" warning, which is desactivated).

 

I won't answer to other replies, since they are at best naive, at worst dishonest. You only have to know than when some people don't like something, there is a little chance than many others actually like it.

Guest
This topic is now closed to further replies.


  • Posts

    • what pack you use  send me on discord for it
    • package custom.events.RandomZoneEvent; import java.io.File; import java.util.ArrayList; import java.util.List; import java.util.Random; import java.util.concurrent.ScheduledFuture; import org.w3c.dom.Document; import org.w3c.dom.Node; import org.l2jmobius.commons.threads.ThreadPool; import org.l2jmobius.commons.time.SchedulingPattern; import org.l2jmobius.commons.time.TimeUtil; import org.l2jmobius.commons.util.IXmlReader; import org.l2jmobius.gameserver.managers.ZoneManager; import org.l2jmobius.gameserver.model.StatSet; import org.l2jmobius.gameserver.model.actor.Creature; import org.l2jmobius.gameserver.model.actor.Npc; import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.quest.Event; import org.l2jmobius.gameserver.model.zone.ZoneId; import org.l2jmobius.gameserver.model.zone.ZoneType; import org.l2jmobius.gameserver.model.zone.type.RandomZone; import org.l2jmobius.gameserver.util.Broadcast; /** * Random Zone Event - Activates one random PvP zone temporarily. No modifica la clase de la zona: usa flags PvP en runtime. * @author Juan */ public class RandomZoneEvent extends Event { private static final String CONFIG_FILE = "data/scripts/custom/events/RandomZoneEvent/config.xml"; private static int EVENT_DURATION_MINUTES = 15; private static boolean _isActive = false; private ScheduledFuture<?> _eventTask = null; private final List<ZoneType> _availableZones = new ArrayList<>(); private ZoneType _activeZone = null; public RandomZoneEvent() { loadConfig(); loadZones(); registerZoneListeners(); } /** * Registra listeners a TODAS LAS ZONAS random */ private void registerZoneListeners() { for (ZoneType zone : _availableZones) { addEnterZoneId(zone.getId()); addExitZoneId(zone.getId()); LOGGER.info("[RandomZoneEvent] Registered listener for zone: " + zone.getName()); } } private void loadConfig() { new IXmlReader() { @Override public void load() { parseDatapackFile(CONFIG_FILE); } @Override public void parseDocument(Document doc, File file) { forEach(doc, "event", eventNode -> { final StatSet att = new StatSet(parseAttributes(eventNode)); final String name = att.getString("name"); for (Node node = eventNode.getFirstChild(); node != null; node = node.getNextSibling()) { if ("schedule".equals(node.getNodeName())) { final StatSet attributes = new StatSet(parseAttributes(node)); final String pattern = attributes.getString("pattern"); final SchedulingPattern schedulingPattern = new SchedulingPattern(pattern); final StatSet params = new StatSet(); params.set("Name", name); params.set("SchedulingPattern", pattern); final long delay = schedulingPattern.getDelayToNextFromNow(); getTimers().addTimer("Schedule_" + name, params, delay + 5000, null, null); LOGGER.info("[RandomZoneEvent] Event " + name + " scheduled at " + TimeUtil.getDateTimeString(System.currentTimeMillis() + delay)); } } }); } }.load(); } private void loadZones() { for (ZoneType zone : ZoneManager.getInstance().getAllZones(RandomZone.class)) { if ((zone.getName() != null) && zone.getName().toLowerCase().startsWith("random_zone")) { _availableZones.add(zone); LOGGER.info("[RandomZoneEvent] Loaded zone: " + zone.getName() + " (id=" + zone.getId() + ")"); } } LOGGER.info("[RandomZoneEvent] Total random zones loaded: " + _availableZones.size()); } @Override public void onTimerEvent(String event, StatSet params, Npc npc, Player player) { if (event.startsWith("Schedule_")) { eventStart(null); final SchedulingPattern schedulingPattern = new SchedulingPattern(params.getString("SchedulingPattern")); final long delay = schedulingPattern.getDelayToNextFromNow(); getTimers().addTimer(event, params, delay + 5000, null, null); LOGGER.info("[RandomZoneEvent] Rescheduled for " + TimeUtil.getDateTimeString(System.currentTimeMillis() + delay)); } } @Override public boolean eventStart(Player eventMaker) { if (_isActive) { if (eventMaker != null) { eventMaker.sendMessage("RandomZoneEvent already active."); } return false; } if (_availableZones.isEmpty()) { Broadcast.toAllOnlinePlayers("[RandomZoneEvent] No zones configured."); return false; } _isActive = true; Broadcast.toAllOnlinePlayers("⚔️ Random Zone Event has started!"); _eventTask = ThreadPool.schedule(this::activateRandomZone, 5_000); return true; } private void activateRandomZone() { _activeZone = _availableZones.get(new Random().nextInt(_availableZones.size())); _activeZone.setEnabled(true); Broadcast.toAllOnlinePlayers("🔥 Random Zone Event: " + _activeZone.getName() + " is now PvP for " + EVENT_DURATION_MINUTES + " minutes!"); _eventTask = ThreadPool.schedule(this::eventStop, EVENT_DURATION_MINUTES * 60 * 1000L); } @Override public boolean eventStop() { if (!_isActive) { return false; } _isActive = false; if (_eventTask != null) { _eventTask.cancel(true); _eventTask = null; } if (_activeZone != null) { _activeZone.setEnabled(false); Broadcast.toAllOnlinePlayers("🏁 Random Zone Event ended. " + _activeZone.getName() + " is back to normal."); _activeZone = null; } else { Broadcast.toAllOnlinePlayers("🏁 Random Zone Event ended."); } return true; } @Override public void onEnterZone(Creature creature, ZoneType zone) { if (!_isActive || (_activeZone == null)) { return; } if ((zone == _activeZone) && creature.isPlayable()) { creature.setInsideZone(ZoneId.PVP, true); if (creature.isPlayer()) { creature.sendMessage("Esta zona está en modo PvP temporalmente."); } } } @Override public void onExitZone(Creature creature, ZoneType zone) { if (!_isActive || (_activeZone == null)) { return; } if ((zone == _activeZone) && creature.isPlayable()) { creature.setInsideZone(ZoneId.PVP, false); if (creature.isPlayer()) { creature.sendMessage("Abandonaste la zona PvP temporal."); } } } @Override public boolean eventBypass(Player player, String bypass) { return true; } @Override public String onEvent(String event, Npc npc, Player player) { return super.onEvent(event, npc, player); } @Override public String onFirstTalk(Npc npc, Player player) { return null; } public static void main(String[] args) { new RandomZoneEvent(); } } i have this but its not working
    • ZonePvPSpawnBossRadio=0 ZonePvPSpawnBossBarakiel=0 at the Customs.ini in L2Server folder. Im prety sure this is it because i had the same problem with you in cruma 1 floor for example and i couldn't fix it but i fixed it finally by changing these 2 lines
    • Siege Reward Start PM Msg Rework Config root BossDieAnnounce and BossDieSound in the L24Team.properties and Config.java files for global raid boss death notifications and sounds. Adds a new reward_list table to the DB.sql file to track castle rewards. Improves character creation logic for thread safety and validation. Adds extensive state checks to the RequestEnchantItem method to prevent enchantments during inappropriate player states. Fixed auto-attack animation bug (there was no attack animation, only damage animation) Clean Code Other fixes I forgot to list! Java 14 Fixed issue where deleting a character would prevent it from leaving the screen or being removed, or even after a delete CD (it would only exit when re-logging in or creating a new character). Added Premium System from the other C2 project (Needs testing and improvement). Added the "Improved" Community Board (incomplete).
  • 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