Last active
December 25, 2015 01:19
-
-
Save PaulBGD/6893732 to your computer and use it in GitHub Desktop.
ArenaTutorial Resource 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package me.ultimate.Arena; | |
import org.bukkit.Location; | |
import org.bukkit.plugin.java.JavaPlugin; | |
public class ArenaTutorial extends JavaPlugin { | |
@Override | |
public void onEnable() { | |
// Loop through all of our arenas when the plugin starts | |
for (String s : getConfig().getConfigurationSection("Arenas").getKeys(false)) { | |
String path = "Arenas." + s + "."; | |
// We'll put our Arena variables here for now. | |
String name = s; | |
Location l1 = LocationUtils.toLocation(getConfig().getString(path + "l1")); | |
Location l2 = LocationUtils.toLocation(getConfig().getString(path + "l2")); | |
Location start = LocationUtils.toLocation(getConfig().getString(path + "start")); | |
Location stop = LocationUtils.toLocation(getConfig().getString(path + "stop")); | |
// Not too bad huh? Here comes the actual arena. | |
new Arena(name, l1, l2, start, stop); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment