Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@PaulBGD
Created September 28, 2013 15:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PaulBGD/6743023 to your computer and use it in GitHub Desktop.
Save PaulBGD/6743023 to your computer and use it in GitHub Desktop.
Arena Resource 3
package me.ultimate.Arena;
import org.bukkit.Location;
public class Arena {
private String name; // A spot to store our arena's name
private Location l1, l2; // Our two corners
private Location spawn, stop; // Where we start and stop
private PlayerManager playerManager; // This is to manage all of the players
// We'll create a new instance of this class with all the data
public Arena(String name, Location l1, Location l2, Location spawn, Location stop) {
// Assign it all to local variables..
this.name = name;
this.l1 = l1;
this.l2 = l2;
this.spawn = spawn;
this.stop = stop;
// Now get a new PlayerManager
playerManager = new PlayerManager(this);
// We'll have the arena register itself
ArenaManager.addArena(this);
}
// Now, we'll put a few methods here to get the variables
public String getName() {
return name;
}
public Location getLocationOne() {
return l1;
}
public Location getLocationTwo() {
return l2;
}
public Location getSpawn() {
return spawn;
}
public Location getStop() {
return stop;
}
// Add a method to get the playerManager
public PlayerManager getPlayerManager() {
return playerManager;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment