Want a better Minecraft server? Read about SpigotMC here!
Separate names with a comma.
Discussion in 'Spigot Plugin Development' started by CluelessCat, Jun 3, 2018.
I'm having some trouble with bukkit and I need some help finding the world name.
If you have an instance of Player, it has a method, #getWorld(). From there, World has a #getName() method. This is some very, very basic Java and you should have either looked around on Google (literally the exact same question) or even the Javadocs which would have provided you an answer fairly quickly
I'm just not sure where to put it. How do I execute it?
Again, very basic Java. You're expected to know how to program in Java before delving into the Bukkit API. We're not here to show you how code should be written. You should be capable enough of doing so on your own after being shown what methods are required. See Oracle's official Java tutorial and read through until you have a basic understanding of the language
To get the World name a player is in: