-
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added 1.21.1 compatibility (#232) - Made map-cursor-lag-patch work on 1.12.2 - Replaced low-tps-physics modules with regional-activity modules. Any sort of activity that has the potential to lag or kill the server when happening at high frequencies can now be individually managed and configured. The base concept for this was suggested by @xKumorio (3b3t.org): Any time an activity is happening for the first time, the plugin will check in a radius around it for more activity of the same kind. If it exceeds a certain count within the configured timeframe, all activity in that radius (region) will be cancelled. The only catch: Config defaults are pretty rough and will most likely need individual adjustments. Tests with a variety of lagmachine designs were pretty promising though. I would very much recommend to check out the entire `lag-preventions.regional-activity` section. - Added a module against lag generated by forcing the server to send large ItemStacks. (Ex. fill chest with books, spam open chest). This is especially a problem with older game versions. Previous modules that were basically a worse attempt at fixing this issue have been removed in favor of this one. Basically works like an anti-spam that starts taking action once the player is exceeding a certain byte-size of requested data within a timeframe. Players will first be rate-limited and if they keep requesting data, locked out from requesting more for a configurable time. - Replaced all deprecated NBT-API calls with the new ones. This makes AEF handling NBT more reliable. - Added an illegal item module against illegal potion effects - Added an illegal item module against illegal item attributes - Fully reworked configurations for Crystal Aura, Anchor Aura and Bed Aura: You can now set place and break cooldowns per Hand on the Folia jar! - Added a patch against MultiTask - Rewrote the patch against SilentSwitch - Improved the burrow patch slightly for more configurability - Added a patch against PortalGodMode (#157) - Improved compatibility with lower game versions by using reflections for TPS and MSPT. This also improved compatibility with unsupported older versions. - Improved world height configuration and detection for Legacy users - Fixed AEF being unable to detect player respawns on Folia - Code optimizations and performance improvements
- Loading branch information
Showing
277 changed files
with
11,348 additions
and
3,898 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/events/PacketPlayerRespawnEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package me.xginko.aef.events; | ||
|
||
import org.bukkit.entity.Player; | ||
import org.bukkit.event.Event; | ||
import org.bukkit.event.HandlerList; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
public class PacketPlayerRespawnEvent extends Event { | ||
|
||
private static final @NotNull HandlerList handlers = new HandlerList(); | ||
|
||
private final @NotNull Player player; | ||
|
||
public PacketPlayerRespawnEvent(@NotNull Player player) { | ||
super(false); | ||
this.player = player; | ||
} | ||
|
||
public @NotNull Player getPlayer() { | ||
return player; | ||
} | ||
|
||
public boolean isPotentialBedSpawn() { | ||
if (player.getPotentialBedLocation() == null) | ||
return false; | ||
return player.getPotentialBedLocation().distanceSquared(player.getLocation()) <= 16; | ||
} | ||
|
||
@Override | ||
public @NotNull HandlerList getHandlers() { | ||
return handlers; | ||
} | ||
|
||
public static HandlerList getHandlerList() { | ||
return handlers; | ||
} | ||
} |
45 changes: 45 additions & 0 deletions
45
AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/listeners/AEFListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package me.xginko.aef.listeners; | ||
|
||
import com.github.retrooper.packetevents.event.PacketListenerAbstract; | ||
import me.xginko.aef.AnarchyExploitFixes; | ||
import me.xginko.aef.utils.models.ConditionalEnableable; | ||
import me.xginko.aef.utils.models.Disableable; | ||
import org.reflections.Reflections; | ||
import org.reflections.scanners.Scanners; | ||
|
||
import java.lang.reflect.Modifier; | ||
import java.util.HashSet; | ||
import java.util.Set; | ||
|
||
public interface AEFListener extends ConditionalEnableable, Disableable { | ||
|
||
Reflections LISTENERS_PACKAGE = new Reflections(AEFListener.class.getPackage().getName()); | ||
|
||
Set<AEFListener> LISTENERS = new HashSet<>(); | ||
|
||
static void reloadListeners() { | ||
LISTENERS.forEach(AEFListener::disable); | ||
LISTENERS.clear(); | ||
|
||
for (Class<?> clazz : LISTENERS_PACKAGE.get(Scanners.SubTypes.of(AEFListener.class).asClass())) { | ||
if (clazz.isInterface() || Modifier.isAbstract(clazz.getModifiers())) continue; | ||
|
||
try { | ||
AEFListener listener = (AEFListener) clazz.getDeclaredConstructor().newInstance(); | ||
if (listener.shouldEnable()) { | ||
if (listener instanceof PacketListenerAbstract && AnarchyExploitFixes.config().packets_disabled) { | ||
AnarchyExploitFixes.getPrefixedLogger() | ||
.warn("Cannot enable listener {} because you disabled packets in config!", clazz.getSimpleName()); | ||
continue; | ||
} | ||
|
||
listener.enable(); | ||
LISTENERS.add(listener); | ||
} | ||
} catch (Throwable t) { | ||
AnarchyExploitFixes.getPrefixedLogger().error("Failed to load listener {}", clazz.getSimpleName(), t); | ||
} | ||
} | ||
} | ||
|
||
} |
Oops, something went wrong.