ForgeModBlocker for Bungee
1.1A Free Mod Blocker for Bungee, an alternative to all the paid ones.
This is a fork of Mas' ForgeModBlocker plugin ( https://github.com/Mas281/ForgeModBlocker) which only works for Spigot. This is a Bungee plugin with the same functionality.
Link to original resource: https://www.spigotmc.org/resources/forgemodblocker.45220/
Permissions are the same, however it is using Bungee permissions and not player permissions.
In order to implement the mod list into a plugin, you need to listen for plugin messages on the FMB|ML channel. The mod list is sent one second after the player joins a server.
ModList Method
public class ModListListener implements PluginMessageListener, Listener {
private final JavaPlugin plugin;
public ModListListener(JavaPlugin plugin) {
this.plugin = plugin;
plugin.getServer().getPluginManager().registerEvents(this, plugin);
plugin.getServer().getMessenger().registerIncomingPluginChannel(plugin, "FMB|ML", this);
}
@Override
public void onPluginMessageReceived(String channel, Player player, byte[] data) {
if (channel.equalsIgnoreCase("FMB|ML")) {
PlayerData playerData = plugin.getPlayerDataManager().getData(player);
boolean store = false;
String tempName = null;
for (int i = 2; i < data.length; store = !store) {
int end = i + data[i] + 1;
byte[] range = Arrays.copyOfRange(data, i + 1, end);
String string = new String(range);
if (store) {
playerData.addMod(tempName, string);
} else {
tempName = string;
}
i = end;
}
}
}
}Similar projects
Plugin →Let Me Despawn
Improves performance by tweaking mob despawn rules. Say bye to pesky unintentional persistent mobs.
25MSueta
JourneyMap
Real-time map used for mapping in-game or your browser as you explore.
14.7MSueta
Emotecraft
Create your own emotes in Minecraft.
7.5MSueta
Simple Tpa
A simple tpa plugin which sends requests
5.4MSueta
Common Network
Forge and Fabric Unified Networking Solution
3.9MSueta
Set Home
A lightweight plugin for players to set their homes.
3.8MSueta