diff --git a/README.md b/README.md index 99942bffe..35056401d 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,7 @@ alongside AEF to patch the majority of exploits. **All features listed here can be disabled or enabled in the config.** * Prevent NoCom exploit. - Prevent the 'NoCom' coordinate exploit +* Prevent a new lag exploit where fireworks can bring tps down to single digits. * Prevent BowBomb exploit. - Prevent an exploit where bows can instantly kill a player. * Prevent burrow hack - Where you step inside a block so crystals can't do any damage. * Prevent boatfly exploit - Prevent the futureclient/rusherhack boatfly exploit. @@ -157,6 +158,7 @@ NoComMaxDistance: 64 # Recommended not to increase PreventEndGatewayCrashExploit: true PreventDispenserCrashExploit: true PreventSnowBallExploit: true +PreventFireworksInPortals: true # Patches lag exploit ProjectilesMaxPerTime: 3 ProjectileTimeTicks: 10 # 3 projectiles can be sent every 10 ticks (0.5 seconds) PreventCraftingRecipeLagExploit: true @@ -340,6 +342,13 @@ ElytraBurstOldChunkTPS: 18 ElytraBurstNewChunkSpeed: 3.12 # 223km/h ElytraBurstNewChunkTPS: 19 +# Spawn elytra settings +ElytraAtSpawn: + Enabled: false + SpeedOldChunks: 1.0 + SpeedNewChunks: 0.8 + Radius: 3000 + LimitRenderDistanceBasedOnTPS: false # Recommended not to use, papers render distance changer is laggy? Try at your own will. # Radius for chunks when the server is below your tps amount NewChunkRadius: 3 diff --git a/pom.xml b/pom.xml index 41544c1b7..43550b500 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ me.moomoo anarchyexploitfixes - 1.22.0 + 1.23.0 jar AnarchyExploitFixes diff --git a/src/main/java/me/moomoo/anarchyexploitfixes/patches/Elytra.java b/src/main/java/me/moomoo/anarchyexploitfixes/patches/Elytra.java index fc6d630df..90496a5d3 100644 --- a/src/main/java/me/moomoo/anarchyexploitfixes/patches/Elytra.java +++ b/src/main/java/me/moomoo/anarchyexploitfixes/patches/Elytra.java @@ -88,22 +88,22 @@ public void onPlayerMove(PlayerMoveEvent evt) { } boolean atSpawn = false; - if(plugin.getConfig().getBoolean("ElytraAtSpawn.Enabled")){ + if (plugin.getConfig().getBoolean("ElytraAtSpawn.Enabled")) { atSpawn = isAtSpawnRadius(evt.getPlayer().getLocation()); - if(atSpawn){ + if (atSpawn) { max_speed = plugin.getConfig().getDouble("ElytraAtSpawn.SpeedNewChunks"); } } if (finalValue > (max_speed + 0.02) && !evt.getPlayer().isOp()) { evt.setCancelled(true); - if(atSpawn){ + if (atSpawn) { if (evt.getPlayer().getLocale().startsWith("es")) { evt.getPlayer().sendActionBar(ChatColor.RED + "Baja la configuración de tu élitro, la velocidad está restringida en nuevos spawn chunks."); } else { evt.getPlayer().sendActionBar(ChatColor.RED + "Turn down your elytra settings, speed is restricted in new spawn chunks."); } - }else{ + } else { if (evt.getPlayer().getLocale().startsWith("es")) { evt.getPlayer().sendActionBar(ChatColor.RED + "Baja la configuración de tu élitro, la velocidad está restringida en nuevos chunks."); } else { @@ -130,22 +130,22 @@ public void onPlayerMove(PlayerMoveEvent evt) { } boolean atSpawn = false; - if(plugin.getConfig().getConfigurationSection("ElytraAtSpawn").getBoolean("Enabled")){ + if (plugin.getConfig().getConfigurationSection("ElytraAtSpawn").getBoolean("Enabled")) { atSpawn = isAtSpawnRadius(evt.getPlayer().getLocation()); - if(atSpawn){ + if (atSpawn) { max_speed = plugin.getConfig().getDouble("ElytraAtSpawn.SpeedOldChunks"); } } if (finalValue > (max_speed + 0.02) && !evt.getPlayer().isOp()) { evt.setCancelled(true); - if(atSpawn){ + if (atSpawn) { if (evt.getPlayer().getLocale().startsWith("es")) { evt.getPlayer().sendActionBar(ChatColor.RED + "Baja la configuración de tu élitro, la velocidad está restringida en spawn chunks."); } else { evt.getPlayer().sendActionBar(ChatColor.RED + "Turn down your elytra settings, speed is restricted in spawn chunks."); } - }else{ + } else { if (evt.getPlayer().getLocale().startsWith("es")) { evt.getPlayer().sendActionBar(ChatColor.RED + "Baja la configuración de tu elytra, vas demasiado rápido."); } else { diff --git a/src/main/java/me/moomoo/anarchyexploitfixes/patches/NetherPortals.java b/src/main/java/me/moomoo/anarchyexploitfixes/patches/NetherPortals.java index 1482e16e4..276da74e5 100644 --- a/src/main/java/me/moomoo/anarchyexploitfixes/patches/NetherPortals.java +++ b/src/main/java/me/moomoo/anarchyexploitfixes/patches/NetherPortals.java @@ -6,14 +6,25 @@ import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.Sound; +import org.bukkit.entity.EntityType; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; +import org.bukkit.event.entity.EntityPortalEvent; import org.bukkit.event.player.PlayerPortalEvent; @RequiredArgsConstructor public class NetherPortals implements Listener { private final Main plugin; + @EventHandler + private void onPortal(EntityPortalEvent evt) { + if (plugin.getConfig().getBoolean("PreventFireworksInPortals")) { + if (evt.getEntity().getType().equals(EntityType.FIREWORK)) { + evt.setCancelled(true); + } + } + } + @EventHandler private void onPortal(PlayerPortalEvent evt) { if (plugin.getConfig().getBoolean("PreventPortalTraps")) { diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 5ca6b101b..40fd6605b 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -31,6 +31,7 @@ NoComMaxDistance: 64 # Recommended not to increase PreventEndGatewayCrashExploit: true PreventDispenserCrashExploit: true PreventSnowBallExploit: true +PreventFireworksInPortals: true # Patches lag exploit ProjectilesMaxPerTime: 3 ProjectileTimeTicks: 10 # 3 projectiles can be sent every 10 ticks (0.5 seconds) PreventCraftingRecipeLagExploit: true