This is a tutorial for NamelessMC v2 pr6
Hi there,
So I have recently discovered that if I type my domain as the server IP this (in Integration > Minecarft > Minecraft Server > my server) happens:
I get MYDOMAIN: to show, because of that : it registers the server as ofline coz it can't resolve the hostname. And it also copies it like that.
So I was playing around with some source code of Nameless and I figures out how to Resolve this issue
If you already have FTP software skip steps 3 and 4 | If you host your site by yourself skip steps 2, 3, 4, 5 and 6
- First you WILL need to type in the IP of the server and the port (in Integration > Minecarft > Minecraft Server > My Server)
- Now find the FTP info from your website hosting service
- Download free FTP software - I reccoment THIS one
- Now Install It
- Input your FTP information you found on your hosts site
- Log in
- Go to htdocs > modules > Core
- Open the module.php file
- Go to the line 576
- Make sure that the line is the first $smarty->assign line after this line of code: if(!is_null($default) && isset($default->ip)){
- Replace the line with:
- $smarty->assign('CONNECT_WITH', str_replace('{x}', '' . Output::getClean($default->ip = 'YOUR DOMAIN' . ($default->port = '')) . '', $language->get('general', 'connect_with_ip_x')));
- Make sure that the above code is in one line
- Save the file, Refresh the page and BOOM, Its working... Probably!
So That is it, Hope you find this useful!
-Landi
Also could I Know Is there any way to get Infractions on 2.0 pre-6???
And also the Ban Apeal and Staff Apply?
Hey Samerton,
Got another problem... YEEEEAAAAAAAH. So can you send me the file name and line where the copying od the IP happens? Thanks!
And also I have an issue with the plugin: So I have the NamelessMC-Spigot-Pre-1.1 and v2.0.0 pre-6 NamelessMC. On my site I HAVE Legacy API Enabled, aswell as API by itself. I have not enabled force www,But you can go to my site with and without www. In the plugin config @ the api_url I tried to type:
api-url: http://wpmc.gq/api/v1/MYKEY
api-url: "http://wpmc.gq/api/v1/MYKEY"
api-url: http://wpmc.gq/api/v2/MYKEY
api-url: "http://wpmc.gq/api/v2/MYKEY"
All gave me this error:
> [13:45:19 INFO]: [NamelessMC] [WARNING] Invalid API key
> [13:45:19 WARN]: com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 22
> [13:45:19 WARN]: at com.google.gson.JsonParser.parse(JsonParser.java:65)
> [13:45:19 WARN]: at com.google.gson.JsonParser.parse(JsonParser.java:45)
> [13:45:19 WARN]: at com.namelessmc.namelessplugin.spigot.API.CheckWebAPIConnection.(CheckWebAPIConnection.java:56)
> [13:45:19 WARN]: at com.namelessmc.namelessplugin.spigot.API.NamelessAPI.checkConnection(NamelessAPI.java:46)
> [13:45:19 WARN]: at com.namelessmc.namelessplugin.spigot.API.Config.NamelessConfigManager.initConfig(NamelessConfigManager.java:89)
> [13:45:19 WARN]: at com.namelessmc.namelessplugin.spigot.API.Config.NamelessConfigManager.initializeFiles(NamelessConfigManager.java:27)
> [13:45:19 WARN]: at com.namelessmc.namelessplugin.spigot.NamelessPlugin.onEnable(NamelessPlugin.java:105)
> [13:45:19 WARN]: at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:321)
> [13:45:19 WARN]: at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:340)
> [13:45:19 WARN]: at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:405)
> [13:45:19 WARN]: at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugin(CraftServer.java:357)
> [13:45:19 WARN]: at org.bukkit.craftbukkit.v1_8_R3.CraftServer.enablePlugins(CraftServer.java:317)
> [13:45:19 WARN]: at net.minecraft.server.v1_8_R3.MinecraftServer.s(MinecraftServer.java:414)
> [13:45:19 WARN]: at net.minecraft.server.v1_8_R3.MinecraftServer.k(MinecraftServer.java:378)
> [13:45:19 WARN]: at net.minecraft.server.v1_8_R3.MinecraftServer.a(MinecraftServer.java:333)
> [13:45:19 WARN]: at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.java:263)
> [13:45:19 WARN]: at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:525)
> [13:45:19 WARN]: at java.lang.Thread.run(Thread.java:748)
> [13:45:19 WARN]: Caused by: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 22
> [13:45:19 WARN]: at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1505)
> [13:45:19 WARN]: at com.google.gson.stream.JsonReader.checkLenient(JsonReader.java:1386)
> [13:45:19 WARN]: at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:531)
> [13:45:19 WARN]: at com.google.gson.stream.JsonReader.peek(JsonReader.java:414)
> [13:45:19 WARN]: at com.google.gson.JsonParser.parse(JsonParser.java:60)
> [13:45:19 WARN]: ... 17 more
> [13:45:19 INFO]: [NamelessMC] [WARNING] Invalid API Url/Key, Please set the correct API url! disabling features
Hey Samerton,
Got another problem... YEEEEAAAAAAAH. So can you send me the file name and line where the copying od the IP happens? Thanks!
Hey Samerton,
Thank you! BTW. 'connect_with_ip_x' => 'Connect now using the IP MYDOMAIN', // Don't replace {x} <- I broke the rule :O
7:03AM Oh, I also broke the click to copy thhing
7:06AM Tried to fix it, I added $x = MYDOMAIN; at the top, It doesnt work