2017-01-15 18:17:02 +00:00
|
|
|
package me.mrCookieSlime.Slimefun.GitHub;
|
|
|
|
|
2019-05-30 11:42:06 +00:00
|
|
|
import java.util.HashMap;
|
|
|
|
import java.util.Map;
|
|
|
|
|
2017-12-09 15:28:45 +00:00
|
|
|
/**
|
|
|
|
* Represents a contributor on Slimefun4's GitHub repository.
|
|
|
|
*
|
|
|
|
* @since 4.1.6
|
|
|
|
*/
|
2017-01-15 18:17:02 +00:00
|
|
|
public class Contributor {
|
|
|
|
|
2019-05-30 11:42:06 +00:00
|
|
|
public static Map<String, String> textures = new HashMap<>();
|
|
|
|
|
2017-12-09 15:28:45 +00:00
|
|
|
private String name;
|
|
|
|
private String job;
|
|
|
|
private String profile;
|
|
|
|
private int commits;
|
2017-01-15 18:17:02 +00:00
|
|
|
|
|
|
|
public Contributor(String name, String job, int commits) {
|
|
|
|
this.name = name;
|
|
|
|
this.job = job;
|
|
|
|
this.commits = commits;
|
|
|
|
}
|
|
|
|
|
2017-12-09 15:28:45 +00:00
|
|
|
/**
|
|
|
|
* Returns the name of this contributor.
|
|
|
|
*
|
|
|
|
* @return the name of this contributor
|
2018-01-06 14:03:28 +00:00
|
|
|
* @since 4.1.13
|
2017-12-09 15:28:45 +00:00
|
|
|
*/
|
|
|
|
public String getName() { return this.name; }
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the job of this contributor.
|
|
|
|
* It can be {@code Author} or {@code Head Artist}.
|
|
|
|
*
|
|
|
|
* @return the job of this contributor
|
2018-01-06 14:03:28 +00:00
|
|
|
* @since 4.1.13
|
2017-12-09 15:28:45 +00:00
|
|
|
*/
|
|
|
|
public String getJob() { return this.job; }
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the link to the GitHub profile of this contributor.
|
|
|
|
*
|
|
|
|
* @return the GitHub profile of this contributor.
|
2018-01-06 14:03:28 +00:00
|
|
|
* @since 4.1.13
|
2017-12-09 15:28:45 +00:00
|
|
|
*/
|
|
|
|
public String getProfile() { return this.profile; }
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the number of commits to the Slimefun4's repository of this contributor.
|
|
|
|
*
|
|
|
|
* @return the number of commits of this contributor.
|
2018-01-06 14:03:28 +00:00
|
|
|
* @since 4.1.13
|
2017-12-09 15:28:45 +00:00
|
|
|
*/
|
|
|
|
public int getCommits() { return this.commits; }
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets the link to the GitHub profile of this contributor.
|
|
|
|
*
|
|
|
|
* @param profile the link to the GitHub profile of this contributor
|
|
|
|
*
|
2018-01-06 14:03:28 +00:00
|
|
|
* @since 4.1.13
|
2017-12-09 15:28:45 +00:00
|
|
|
*/
|
|
|
|
protected void setProfile(String profile) {
|
|
|
|
this.profile = profile;
|
|
|
|
}
|
2019-05-30 11:42:06 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns this Creator's head texture
|
|
|
|
* @return A Base64-Head Texture
|
|
|
|
*/
|
|
|
|
public String getTexture() {
|
|
|
|
return textures.get(name);
|
|
|
|
}
|
2017-01-15 18:17:02 +00:00
|
|
|
}
|