Last active
February 2, 2017 03:08
-
-
Save BlackBeltPanda/3fe2b342f42494428e238ca6aeaec393 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
public class Machine { | |
private Location loc; | |
private boolean active = true; | |
private int limit; | |
public Machine(Location loc){ | |
this.loc = loc; | |
} | |
public void activate(){ | |
this.active = true; | |
} | |
public void deactivate(){ | |
this.active = false; | |
} | |
public void setLimit(int limit){ | |
this.limit = limit; | |
} | |
public boolean isActive(){ | |
return active; | |
} | |
public String getRegion(){ | |
return WorldGuard.getRegionName(loc); | |
} | |
public int getLimit(){ | |
return limit; | |
} | |
} |
This file contains hidden or 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
public class Miner extends Machine { | |
public Miner(Location loc){ | |
super(loc); | |
} | |
public void setLimit(){ | |
setLimit(10); | |
} | |
public void run(Location loc) { | |
//Do stuff | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment