mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-18 11:29:15 +00:00
Channel validation
This commit is contained in:
1 parent
c74e119993
commit
bd34b97e9b
3 files changed
+103
-6
No files matched your search
@@ -516,4 +516,16 @@ public class ModLoader {
|
||||
public static MinecraftServer getMinecraftServerInstance() {
|
||||
return FMLHandler.instance().getServer();
|
||||
}
|
||||
|
||||
/**
|
||||
* To properly implement packet 250 protocol you should always check your channel
|
||||
* is active prior to sending the packet
|
||||
*
|
||||
* @param player
|
||||
* @param channel
|
||||
* @return
|
||||
*/
|
||||
public static boolean isChannelActive(EntityPlayer player, String channel) {
|
||||
return FMLHooks.instance().isChannelActive(channel,player);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user