Skip to content

Instantly share code, notes, and snippets.

@BlackBeltPanda
Last active February 2, 2017 03:08
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 BlackBeltPanda/3fe2b342f42494428e238ca6aeaec393 to your computer and use it in GitHub Desktop.
Save BlackBeltPanda/3fe2b342f42494428e238ca6aeaec393 to your computer and use it in GitHub Desktop.
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;
}
}
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