Skip to content

Commit

Permalink
fix: do not require github pat to dump
Browse files Browse the repository at this point in the history
  • Loading branch information
BrycensRanch committed Mar 18, 2023
1 parent 41d2b49 commit 60e2fad
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/main/java/me/romvnly/TownyPlus/TownyPlusMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public void onEnable() {
plugin = this;
this.adventure = BukkitAudiences.create(this);
logger = ComponentLogger.logger(getName());
// saveDefaultConfig();
saveDefaultConfig();
Config.reload();
Lang.reload();
expansion = new TownyPlusExpansion();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public static void reload() {
public static boolean CHECK_FOR_UPDATES = true;
public static boolean METRICS_ENABLED = true;

public static String githubPAT = null;
public static String githubPAT = "none";


private static void baseSettings() {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/me/romvnly/TownyPlus/util/WebUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public static String getBody(String reqURL) {
URL url = new URL(reqURL);
HttpURLConnection con = (HttpURLConnection) url.openConnection();
con.setRequestMethod("GET");
if (Config.githubPAT != null && !Config.githubPAT.isEmpty()) {
if (Config.githubPAT != null && !Config.githubPAT.isEmpty() && !Config.githubPAT.equalsIgnoreCase("none")) {
con.setRequestProperty("Authorization", "Bearer " + Config.githubPAT);
}
con.setConnectTimeout(10000);
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ settings:
# The GitHub personal access token to use for the auto updater
# This doesn't apply to the update checker nor should you need to use it.
# This was only used for testing purposes and is not needed for the plugin to work.
github-pat: ''
github-pat: 'none'

# Polymart users should not enable this, you guys already have a way to auto update that is proven to work with TownyPlus
# If you're not using Polymart, you can enable this to auto-update TownyPlus
Expand Down

0 comments on commit 60e2fad

Please sign in to comment.