mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-20 03:35:51 +00:00
[Ci skip] Little preparation
This commit is contained in:
parent
761d52a9c6
commit
aa3007ef0a
@ -357,7 +357,12 @@ public final class GuideSettings {
|
|||||||
String info = entry.getKey();
|
String info = entry.getKey();
|
||||||
|
|
||||||
if (!info.startsWith("&")) {
|
if (!info.startsWith("&")) {
|
||||||
info = SlimefunPlugin.getLocal().getMessage(p, "guide.credits.roles." + info);
|
String[] segments = info.split(",");
|
||||||
|
info = SlimefunPlugin.getLocal().getMessage(p, "guide.credits.roles." + segments[0]);
|
||||||
|
|
||||||
|
if (segments.length == 2) {
|
||||||
|
info += " &7(" + SlimefunPlugin.getLocal().getMessage(p, "languages." + segments[1]) + ")";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entry.getValue() > 0) {
|
if (entry.getValue() > 0) {
|
||||||
|
@ -45,13 +45,16 @@ public class GitHubService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void addDefaultContributors() {
|
private void addDefaultContributors() {
|
||||||
Contributor thebusybiscuit = new Contributor("TheBusyBiscuit", "https://github.com/TheBusyBiscuit");
|
|
||||||
thebusybiscuit.setContribution("&4Original Creator", 0);
|
|
||||||
contributors.put(thebusybiscuit.getName(), thebusybiscuit);
|
|
||||||
|
|
||||||
Contributor fuffles = new Contributor("Fuffles_");
|
Contributor fuffles = new Contributor("Fuffles_");
|
||||||
fuffles.setContribution("&dSkull Texture Artist", 0);
|
fuffles.setContribution("&dSkull Texture Artist", 0);
|
||||||
contributors.put(fuffles.getName(), fuffles);
|
contributors.put(fuffles.getName(), fuffles);
|
||||||
|
|
||||||
|
addTranslator("TheBusyBiscuit", "de");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void addTranslator(String name, String language) {
|
||||||
|
Contributor contributor = contributors.computeIfAbsent(name, user -> new Contributor(user, "https://github.com/" + user));
|
||||||
|
contributor.setContribution("translator," + language, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void connect(boolean logging) {
|
public void connect(boolean logging) {
|
||||||
|
@ -22,7 +22,9 @@ public class ContributionsConnector extends GitHubConnector {
|
|||||||
"ImgBotApp",
|
"ImgBotApp",
|
||||||
"imgbot",
|
"imgbot",
|
||||||
"imgbot[bot]",
|
"imgbot[bot]",
|
||||||
"github-actions[bot]"
|
"github-actions[bot]",
|
||||||
|
"gitlocalize-app",
|
||||||
|
"gitlocalize-app[bot]"
|
||||||
);
|
);
|
||||||
|
|
||||||
// Matches a GitHub name with a Minecraft name.
|
// Matches a GitHub name with a Minecraft name.
|
||||||
|
@ -78,6 +78,10 @@ public class Contributor {
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getContributions(String role) {
|
||||||
|
return contributions.getOrDefault(role, 0);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns this Creator's head texture.
|
* Returns this Creator's head texture.
|
||||||
* If no texture could be found, or it hasn't been pulled yet,
|
* If no texture could be found, or it hasn't been pulled yet,
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package io.github.thebusybiscuit.slimefun4.core.services.github;
|
package io.github.thebusybiscuit.slimefun4.core.services.github;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
Loading…
Reference in New Issue
Block a user