Skip to content

Commit

Permalink
1.20.0 - Invalid usernames
Browse files Browse the repository at this point in the history
  • Loading branch information
moom0o committed Oct 31, 2021
1 parent 557b0ef commit dcc27ac
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 11 deletions.
32 changes: 23 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,45 +59,58 @@ by [2LS ExploitFixer](https://www.spigotmc.org/resources/2ls-exploitfixer-the-ul
alongside AEF to patch the majority of exploits.

## Features

**This list does not include all features, check the config for all features!**

**All features listed here can be disabled or enabled in the config.**

* Prevent NoCom exploit. - Prevent the 'NoCom' coordinate exploit
* 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.
* Prevent book-ban - All characters still work! The size of each page is just limited to 255 bytes (customizable). This allows to fill the whole page with latin characters. Characters that use more bytes such as Chinese may be limited in length.
* Prevent book-ban - All characters still work! The size of each page is just limited to 255 bytes (customizable). This
allows to fill the whole page with latin characters. Characters that use more bytes such as Chinese may be limited in
length.
* Prevent unbreakable packet elytra fly.
* Prevent packet fly exploit.
* Prevent end gateway crash exploit. - https://www.youtube.com/watch?v=c5nVBQeYo-I
* Patch end portal dupe. - https://www.youtube.com/watch?v=RLvErqzeK3Y
* Prevent Y256 dispenser crash exploit. - https://www.youtube.com/watch?v=XL17P87O6xA
* Anti-illegal system. - Automatically remove illegal items, stacked items, high enchanted items, unenchantable items, and items in shulkers.
* Anti-illegal system. - Automatically remove illegal items, stacked items, high enchanted items, unenchantable items,
and items in shulkers.
* Limit speed of snowballs to prevent clientside lag.
* Limit crafting table autorecipe speed to prevent a lag exploit.
* Prevent all coordinate exploits related to teleporting by vanishing a player right before they are teleported.
* Prevent destroying end portal frames.
* Prevent multiple end dragons from being created.
* Prevent portal traps - Disabled by default.
* Automatically fill in the bedrock floor/roof if the bedrock has been broken.
* Prevent players from going below the bedrock floor by teleporting them up. - Useful so people can't elytra fly below the world.
* Prevent players from going below the bedrock floor by teleporting them up. - Useful so people can't elytra fly below
the world.
* Remove wither heads automatically to prevent lag. - Removes on chunk unload or after 10 seconds (customizable)
* Option to disable wither spawning at spawn. - Disabled by default.
* Prevent chunk ban exploit. - Checks how much of each block is in a chunk.
* Prevent chat spam. - Delay between messages, Max messages per a certain time, seperate link delay, character limit, and more!
* Prevent chat spam. - Delay between messages, Max messages per a certain time, seperate link delay, character limit,
and more!
* Prevent god mode exploit. - Prevent most godmode exploits, please note, there could still be bypasses.
* Prevent command signs. - Prevent players from right clicking signs that have been placed with a command attached. For example, from a backdoor.
* Prevent invalid names. - Disallow login from players with invalid characters/too long of a name.
* Prevent command signs. - Prevent players from right clicking signs that have been placed with a command attached. For
example, from a backdoor.
* Limit falling blocks per chunk to prevent lag.
* Limit exp bottles per chunk to prevent lag.
* Prevent projectiles from going through portals, shooting projectiles through portals can get them stuck in the same place on the other side, once they are loaded the server can crash.
* Prevent projectiles from going through portals, shooting projectiles through portals can get them stuck in the same
place on the other side, once they are loaded the server can crash.
* Prevent too many vehicles, such as minecarts, in chunks.
* Prevent bedtraps. - Disabled by default.
* Prevent nether roof access. - Disabled by default.
* Option to disable chests on donkeys. - This is unlike IllegalStack's, no items will drop if the chest is broken. Useful to prevent many dupe exploits, Disabled by default.
* Option to disable chests on donkeys. - This is unlike IllegalStack's, no items will drop if the chest is broken.
Useful to prevent many dupe exploits, Disabled by default.
* Option to prevent donkeys from going through portals. - Useful to prevent many dupe exploits, disabled by default.
* Option to mask all kick messages. - Change every kick message to "You have lost connection to the server", or whichever you specify. Disabled by default.
* Option to mask all kick messages. - Change every kick message to "You have lost connection to the server", or
whichever you specify. Disabled by default.
* Option to enable first join message. - Disabled by default.
* Command whitelist - Useful for only allowing commands that you want to be allowed, so players can't find your plugins. Disabled by default.
* Command whitelist - Useful for only allowing commands that you want to be allowed, so players can't find your plugins.
Disabled by default.
* Elytra speed limits for old and new chunks, and bursting settings for when tps is high.
* Elytra action bar to show players the speed they are going and speed limit.
* Option to ratelimit levers, disabled by default.
Expand Down Expand Up @@ -155,6 +168,7 @@ MinDistanceToVanishPlayer: 100 # Minimum distance to vanish player when teleport
PreventDestroyingEndPortals: true
PreventMultipleEnderDragons: true # Prevents multiple ender dragons from spawning when one goes into an end gateway
PreventPortalTraps: false
PreventInvalidNames: true # Prevent names with characters that are non letters, numbers, or underscores, or too long/too short.

PreventBurrow: true # Preliminary burrow patch, please test. Makes players take damage every time they move when their feet are in a block
BurrowDamageWhenMoving: 1 # Half a heart of damage every time you move.
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>me.moomoo</groupId>
<artifactId>anarchyexploitfixes</artifactId>
<version>1.19.0</version>
<version>1.20.0</version>
<packaging>jar</packaging>

<name>AnarchyExploitFixes</name>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/me/moomoo/anarchyexploitfixes/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public void onEnable() {
new CommandExploits(this), new WitherSpawning(this),
new Burrow(this), new BookBan(this),
new AntiBedTrap(this), new Commands(this),
new BowBomb(this)
new BowBomb(this), new InvalidNames(this)
);

if (getConfig().getBoolean("DisableAllProtocolLib")) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package me.moomoo.anarchyexploitfixes.patches;

import lombok.RequiredArgsConstructor;
import me.moomoo.anarchyexploitfixes.Main;
import org.bukkit.ChatColor;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.AsyncPlayerPreLoginEvent;

@RequiredArgsConstructor
public class InvalidNames implements Listener {
private final Main plugin;

@EventHandler
public void onLogin(AsyncPlayerPreLoginEvent evt) {
if (plugin.getConfig().getBoolean("PreventInvalidNames")) {
if (evt.getName().matches("[A-Za-z0-9_]+") && evt.getName().length() >= 1 && evt.getName().length() <= 16) {
evt.allow();
} else {
plugin.getLogger().warning("Invalid Username Join: " + evt.getName());
evt.disallow(AsyncPlayerPreLoginEvent.Result.KICK_OTHER, ChatColor.RED + "Invalid Username");
}
}
}
}
1 change: 1 addition & 0 deletions src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ MinDistanceToVanishPlayer: 100 # Minimum distance to vanish player when teleport
PreventDestroyingEndPortals: true
PreventMultipleEnderDragons: true # Prevents multiple ender dragons from spawning when one goes into an end gateway
PreventPortalTraps: false
PreventInvalidNames: true # Prevent names with characters that are non letters, numbers, or underscores, or too long/too short.

PreventBurrow: true # Preliminary burrow patch, please test. Makes players take damage every time they move when their feet are in a block
BurrowDamageWhenMoving: 1 # Half a heart of damage every time you move.
Expand Down

0 comments on commit dcc27ac

Please sign in to comment.