Guest User

Untitled

a guest
May 27th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. package me.firefly.BuildersPlot;
  2.  
  3. import java.util.HashMap;
  4. import java.util.Map;
  5.  
  6. import org.bukkit.Location;
  7.  
  8. public class PlayerProperties {
  9. String playerName;
  10. Map<String, Zone> zones = new HashMap<String, Zone>();
  11.  
  12. public PlayerProperties(String playerName) {
  13. this.playerName = playerName;
  14. }
  15.  
  16. public void addZone(Zone zone) {
  17. zones.put(zone.getName(), zone);
  18.  
  19. }
  20.  
  21. public void removeZone(String name) {
  22. zones.remove(name);
  23. }
  24.  
  25. public boolean canBuild(Location location) {
  26. for (Zone zone: zones.values()) {
  27. if (zone.isIn(location)) {
  28. return true;
  29. }
  30. }
  31. return false;
  32. }
  33.  
  34.  
  35.  
  36. }
Add Comment
Please, Sign In to add comment