Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package me.firefly.BuildersPlot;
- import java.util.HashMap;
- import java.util.Map;
- import org.bukkit.Location;
- public class PlayerProperties {
- String playerName;
- Map<String, Zone> zones = new HashMap<String, Zone>();
- public PlayerProperties(String playerName) {
- this.playerName = playerName;
- }
- public void addZone(Zone zone) {
- zones.put(zone.getName(), zone);
- }
- public void removeZone(String name) {
- zones.remove(name);
- }
- public boolean canBuild(Location location) {
- for (Zone zone: zones.values()) {
- if (zone.isIn(location)) {
- return true;
- }
- }
- return false;
- }
- }
Add Comment
Please, Sign In to add comment