Updated-NoCheatPlus / NoCheatPlus

Anti-cheating plugin for Minecraft (1.5-1.20, Bukkit/Spigot)
https://ci.codemc.io/job/Updated-NoCheatPlus/job/Updated-NoCheatPlus/
GNU General Public License v3.0
468 stars 103 forks source link

Replace usage of java.util.Random #330

Closed skbeh closed 6 months ago

skbeh commented 6 months ago

Replace usage of java.util.Random with java.util.concurrent.ThreadLocalRandom, or java.util.SplittableRandom when setting seed is required. This provides better performance and randomness.

Also do not manually generate seed when unnecessary since the Java runtime mixes more bits into the automatically generated one.

xaw3ep commented 6 months ago

Thank you so much!