M8 I use bungeecord for all of my quickscopeee plugins.BungeeCord then. c;
Uhhhhh, Factions and skyblock are simple plugins xDDD
It's completely possible to write plugins in anything that can run on top of the JVM - Java is pretty much the language-of-choice for most of the Minecraft ecosystem, since there's already so much material out there already to learn from, but the most difficult thing at the moment is not learning the language (I was able to start writing plugins within a week of learning Java, but it took a few months before I started on more complex things and a while longer before I worked on bigger servers like CCG and Wayward Realms)
The exception to this is Forge, which has a lot of Scala code.
As rubik pointed out, a lot of you aren't making the distinction between Java and JavaScript - however, Java includes a scripting engine with Rhino and Nashorn, which would allow you to write the bulk of plugins in JavaScript if you particularly wanted to do that (it can actually precompile them as well). There are also third-party implementations that allow you to write in Python, Ruby, Groovy, and more.
As for C++, you'd write with JNI (Java Native Interface) which allows you to, as the name suggests, write with native code written in C, C++ or Assembly (which doesn't gain any of the optimisations of the JVM, so will most likely run slower, and memory leaks will take a bigger effect if you forget to clean up your resources properly.
Back in the Minecraft Classic days, there were entire server implementations in Python - that would still be possible nowadays, but it would be harder since the protocol is so much more complex than it was back then.
Seriously though, if you're looking at learning now, you've missed Minecraft's peak and you're going to struggle to get an audience together, assuming you do manage to get around the issue of DMCA'd server downloads, EULA and such. Better to look for another game to mod (I'm doing some stuff with Risk of Rain right now)
Thanks for explaining everything was good java basics, but I wonder how you make plugins skywars, I mean with javasript? Thanks must help those who do not! regards
"Better" is subjective - in some cases, for example dynamic loading, JavaScript may have an advantage (although in that sort of case I'd prefer to write in Python - it's the nicer language to write in)Don't. Java is much better and Bukkit can be used more easily with Java. Go look up some tutorials on Java basics and some tutorials on Bukkit.
Good Luck!
import javax.script.*;
import org.bukkit.plugin.java.JavaPlugin;
public class MyJavaScriptPlugin extends JavaPlugin {
public void onEnable() {
ScriptEngineManager engineManager = new ScriptEngineManager();
ScriptEngine engine = engineManager.getEngineByName("javascript");
engine.eval("function myJavaScriptFunction(plugin) {\n" +
" plugin.getLogger().info('Called from JavaScript!');\n" +
"}\n" +
"myJavaScriptFunction(plugin);\n",
new SimpleBindings(new HashMap<>() {{
put("plugin", this);
}})
);
}
}
. Simply, genius."Better" is subjective - in some cases, for example dynamic loading, JavaScript may have an advantage (although in that sort of case I'd prefer to write in Python - it's the nicer language to write in)
Writing in Python is practically the same - just link against Jython and use engineManager.getEngineByName("python")You just spent 10-20 minutes typing a message telling me about some obsolete and inefficient method of invoking JavaScript methods from a Java environment. You said it yourself: . Simply, genius.
Learn the entirety of the collections API, not just HashMap. Learning when it's best to use a Set or a List, or a TreeMap or HashMap is fairly fundamental.Learn basics of java, try to do stuff, derp with hashmaps, and thats almost it.
This entire thread's in English. I used to have a Danish friend who said there were two languages though: English, and technical English.And then have people translate what they are saying in English? I think you all missed that step out :/