mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-19 19:25:48 +00:00
[CI skip] 200+ contributors, we need a third page 👀
This commit is contained in:
parent
dcc5648c8f
commit
0fbb9b2d9b
6
.github/ISSUE_TEMPLATE/bug-report.md
vendored
6
.github/ISSUE_TEMPLATE/bug-report.md
vendored
@ -48,6 +48,6 @@ assignees: ''
|
||||
<!-- Make sure that the screenshot covers the entire output of that command. -->
|
||||
<!-- If your issue is related to other plugins, make sure to include the versions of these plugins too! -->
|
||||
|
||||
- Server Software:
|
||||
- Minecraft Version:
|
||||
- Slimefun Version:
|
||||
- Server software:
|
||||
- Minecraft version:
|
||||
- Slimefun version:
|
||||
|
13
.github/PULL_REQUEST_TEMPLATE.md
vendored
13
.github/PULL_REQUEST_TEMPLATE.md
vendored
@ -1,12 +1,15 @@
|
||||
## Description
|
||||
<!-- Please explain what you changed/added and why you did it in detail. -->
|
||||
## Description / Background
|
||||
<!-- Please explain why you are making this pull request. -->
|
||||
<!-- Start writing below this line -->
|
||||
|
||||
## Changes
|
||||
<!-- Please list all the changes you have made. -->
|
||||
## Proposed changes
|
||||
<!-- Please explain what changes you have made to the code. -->
|
||||
<!-- Start writing below this line -->
|
||||
|
||||
## Related Issues
|
||||
## Related Issues (if applicable)
|
||||
<!-- Please tag any Issues related to your Pull Request -->
|
||||
<!-- Syntax: "Resolves #000" -->
|
||||
<!-- Start writing below this line -->
|
||||
|
||||
## Checklist
|
||||
<!-- Here is a little checklist you should follow. -->
|
||||
|
@ -50,8 +50,11 @@ class ContributionsConnector extends GitHubConnector {
|
||||
* These people are... "special cases".
|
||||
*/
|
||||
private void loadConfiguration() {
|
||||
// Bots and invalid accounts we want to ignore.
|
||||
ignoredAccounts.add("invalid-email-address");
|
||||
ignoredAccounts.add("renovate");
|
||||
ignoredAccounts.add("renovate-bot");
|
||||
ignoredAccounts.add("renovate[bot]");
|
||||
ignoredAccounts.add("TheBusyBot");
|
||||
ignoredAccounts.add("ImgBotApp");
|
||||
ignoredAccounts.add("imgbot");
|
||||
@ -61,6 +64,7 @@ class ContributionsConnector extends GitHubConnector {
|
||||
ignoredAccounts.add("gitlocalize-app[bot]");
|
||||
ignoredAccounts.add("mt-gitlocalize");
|
||||
|
||||
// Known Minecraft aliases.
|
||||
aliases.put("WalshyDev", "HumanRightsAct");
|
||||
aliases.put("J3fftw1", "_lagpc_");
|
||||
aliases.put("ajan-12", "ajan_12");
|
||||
|
@ -13,6 +13,8 @@ import java.util.concurrent.TimeUnit;
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import org.apache.commons.lang.Validate;
|
||||
|
||||
import io.github.thebusybiscuit.cscorelib2.config.Config;
|
||||
import io.github.thebusybiscuit.slimefun4.core.services.localization.Translators;
|
||||
import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin;
|
||||
@ -78,10 +80,14 @@ public class GitHubService {
|
||||
* the usual methods.
|
||||
*/
|
||||
private void addDefaultContributors() {
|
||||
// Artists
|
||||
addContributor("Fuffles_", "&dArtist");
|
||||
addContributor("IMS_Art", "&dArtist");
|
||||
addContributor("IMS_Art", "https://github.com/IAmSorryArt", "&dArtist", 0);
|
||||
|
||||
// Addon Jam winners
|
||||
addContributor("nahkd123", "&aWinner of the 2020 Addon Jam");
|
||||
|
||||
// Translators
|
||||
new Translators(this);
|
||||
}
|
||||
|
||||
@ -94,6 +100,11 @@ public class GitHubService {
|
||||
|
||||
@Nonnull
|
||||
public Contributor addContributor(@Nonnull String minecraftName, @Nonnull String profileURL, @Nonnull String role, int commits) {
|
||||
Validate.notNull(minecraftName, "Minecraft username must not be null.");
|
||||
Validate.notNull(profileURL, "GitHub profile url must not be null.");
|
||||
Validate.notNull(role, "Role should not be null.");
|
||||
Validate.isTrue(commits >= 0, "Commit count cannot be negative.");;
|
||||
|
||||
String username = profileURL.substring(profileURL.lastIndexOf('/') + 1);
|
||||
|
||||
Contributor contributor = contributors.computeIfAbsent(username, key -> new Contributor(minecraftName, profileURL));
|
||||
@ -106,9 +117,10 @@ public class GitHubService {
|
||||
this.logging = logging;
|
||||
addDefaultContributors();
|
||||
|
||||
// TheBusyBiscuit/Slimefun4 (twice because there may me multiple pages)
|
||||
// TheBusyBiscuit/Slimefun4 (multiple times because there may me multiple pages)
|
||||
connectors.add(new ContributionsConnector(this, "code", 1, repository, "developer"));
|
||||
connectors.add(new ContributionsConnector(this, "code2", 2, repository, "developer"));
|
||||
connectors.add(new ContributionsConnector(this, "code3", 3, repository, "developer"));
|
||||
|
||||
// TheBusyBiscuit/Slimefun4-Wiki
|
||||
connectors.add(new ContributionsConnector(this, "wiki", 1, "Slimefun/Wiki", "wiki"));
|
||||
@ -122,6 +134,7 @@ public class GitHubService {
|
||||
this.pendingPullRequests = pullRequests;
|
||||
}));
|
||||
|
||||
// Forks, star count and last commit date
|
||||
connectors.add(new GitHubActivityConnector(this, repository, (forks, stars, date) -> {
|
||||
this.publicForks = forks;
|
||||
this.stargazers = stars;
|
||||
|
@ -124,7 +124,7 @@ public abstract class SlimefunLocalization extends Localization implements Keyed
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getMessage(@Nonnull String key) {
|
||||
Validate.notNull(key, "Message key cannot be null!");
|
||||
Validate.notNull(key, "Message key must not be null!");
|
||||
|
||||
Language language = getDefaultLanguage();
|
||||
|
||||
@ -140,8 +140,8 @@ public abstract class SlimefunLocalization extends Localization implements Keyed
|
||||
|
||||
@Nonnull
|
||||
public String getMessage(@Nonnull Player p, @Nonnull String key) {
|
||||
Validate.notNull(p, "Player cannot be null!");
|
||||
Validate.notNull(key, "Message key cannot be null!");
|
||||
Validate.notNull(p, "Player must not be null!");
|
||||
Validate.notNull(key, "Message key must not be null!");
|
||||
|
||||
Language language = getLanguage(p);
|
||||
|
||||
@ -161,8 +161,8 @@ public abstract class SlimefunLocalization extends Localization implements Keyed
|
||||
|
||||
@Nonnull
|
||||
public List<String> getMessages(@Nonnull Player p, @Nonnull String key) {
|
||||
Validate.notNull(p, "Player cannot be null!");
|
||||
Validate.notNull(key, "Message key cannot be null!");
|
||||
Validate.notNull(p, "Player should not be null.");
|
||||
Validate.notNull(key, "Message key cannot be null.");
|
||||
|
||||
Language language = getLanguage(p);
|
||||
|
||||
@ -183,9 +183,9 @@ public abstract class SlimefunLocalization extends Localization implements Keyed
|
||||
@Nonnull
|
||||
@ParametersAreNonnullByDefault
|
||||
public List<String> getMessages(Player p, String key, UnaryOperator<String> function) {
|
||||
Validate.notNull(p, "Player cannot be null!");
|
||||
Validate.notNull(key, "Message key cannot be null!");
|
||||
Validate.notNull(function, "Function cannot be null!");
|
||||
Validate.notNull(p, "Player cannot be null.");
|
||||
Validate.notNull(key, "Message key cannot be null.");
|
||||
Validate.notNull(function, "Function cannot be null.");
|
||||
|
||||
List<String> messages = getMessages(p, key);
|
||||
messages.replaceAll(function);
|
||||
@ -195,8 +195,8 @@ public abstract class SlimefunLocalization extends Localization implements Keyed
|
||||
|
||||
@Nullable
|
||||
public String getResearchName(@Nonnull Player p, @Nonnull NamespacedKey key) {
|
||||
Validate.notNull(p, "Player cannot be null!");
|
||||
Validate.notNull(key, "NamespacedKey cannot be null!");
|
||||
Validate.notNull(p, "Player must not be null.");
|
||||
Validate.notNull(key, "NamespacedKey cannot be null.");
|
||||
|
||||
Language language = getLanguage(p);
|
||||
|
||||
@ -209,7 +209,7 @@ public abstract class SlimefunLocalization extends Localization implements Keyed
|
||||
|
||||
@Nullable
|
||||
public String getCategoryName(@Nonnull Player p, @Nonnull NamespacedKey key) {
|
||||
Validate.notNull(p, "Player cannot be null!");
|
||||
Validate.notNull(p, "Player must not be null.");
|
||||
Validate.notNull(key, "NamespacedKey cannot be null!");
|
||||
|
||||
Language language = getLanguage(p);
|
||||
@ -223,8 +223,8 @@ public abstract class SlimefunLocalization extends Localization implements Keyed
|
||||
|
||||
@Nullable
|
||||
public String getResourceString(@Nonnull Player p, @Nonnull String key) {
|
||||
Validate.notNull(p, "Player cannot be null!");
|
||||
Validate.notNull(key, "Message key cannot be null!");
|
||||
Validate.notNull(p, "Player should not be null!");
|
||||
Validate.notNull(key, "Message key should not be null!");
|
||||
|
||||
Language language = getLanguage(p);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user