AutoPortForward
I would like to thank the makers of Cling for their java UPNP library. AutoPortForward uses cling
Introduction: AutoPortForward automaticlly forwards the port that is specified in the server.properties. The gateway device must support UPNP.
How this plugin works: AutoPortForward discovers gateway devices (ex: routers) and attempts to forward the port specified on a one of the devices. AutoPortForward will remove the port forward on disable, and add it again on enable. This is possible by sending a UPNP TCP request to forward a port to the gateway device, if it has UPNP, it will accept this request and forward the port specified in the server.properties. It also tells you your external ip.
"But that's not possible, you NEED to port forward": As I stated above, this is very possible. See here It discovers gateway devices (routers, bridges, modems) and sends a UPNP TCP request to forward the port specified in the server.properties to the gateway device.
What versions of CraftBukkit / Bukkit are supported: AutoPortForward will work with almost if not all versions of CraftBukkit and Bukkit, as long as the onEnable and onDisable are the same.
Configuration: AutoPortForward uses the port in the server.properties (server-port) - The default is 25565.
WARNING: AutoPortForward will remove port mappings that use TCP on the port the server will be running off of, so if you have a web server running on port 80, and a minecraft server on port 80 (Which you shouldn't do) it will delete the web server port mapping and add the minecraft server.
if i am running two server on my computer one of 25565 and another on 25660, is there a way to specify which domain and subdomain will go each server?
@Thomasedv
Download the new version (1.4), requires no folders. Place the AutoPortForward.jar in the plugins folder.
I dovnloaded the file, i do not know where to put it. can you say where to make a folder and what i should call it?
@jamzam90
@Blocker226
Working on a fixed version.
I get this error upon server start after dragging and dropping the plugin into the 'plugins' folder. The only thing I did to my server.properties was to empty the server-ip field (it's a Hamachi server). Here is the error. The folder wasn't even generated. org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: com/jca2323/AutoPortForward/AutoPortForwardMain : Unsupported major.minor version 51.0 at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:151) at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:305) at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:230) at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:213) at org.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:189) at net.minecraft.server.ServerConfigurationManager.<init>(ServerConfigurationManager.java:53) at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:166) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:432) at net.minecraft.server.ThreadServerApplication.run(SourceFile:492) Caused by: java.lang.UnsupportedClassVersionError: com/jca2323/AutoPortForward/AutoPortForwardMain : Unsupported major.minor version 51.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) at java.lang.ClassLoader.defineClass(ClassLoader.java:615) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) at java.net.URLClassLoader.access$000(URLClassLoader.java:58) at java.net.URLClassLoader$1.run(URLClassLoader.java:197) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:41) at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:29) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247) at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:140) ... 8 more
im getting the same error that royal gamer is getting its not working on mine right now i keep getting the error when ever i use plugman to enable it it disable it self right before plugman is finished with enableing it
@Royalgamer06
Version 0.3 should fix that
@Royalgamer06
Put it in the AutoPortForward folder. Also, this will work, because it discovers your internal IP address and forwards it, than on disable it un-forwards it on disable, so if your internal IP changes, there won't be an un-used open port.