Skip to content

Commit fbd8f71

Browse files
committed
1.21 Update
1 parent 2919046 commit fbd8f71

File tree

7 files changed

+277
-202
lines changed

7 files changed

+277
-202
lines changed

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>dev.timecoding</groupId>
88
<artifactId>FasterAscend</artifactId>
9-
<version>1.0</version>
9+
<version>1.3</version>
1010
<packaging>jar</packaging>
1111

1212
<name>FasterAscend</name>
@@ -69,7 +69,7 @@
6969
<dependency>
7070
<groupId>org.spigotmc</groupId>
7171
<artifactId>spigot-api</artifactId>
72-
<version>1.19.4-R0.1-SNAPSHOT</version>
72+
<version>1.20.4-R0.1-SNAPSHOT</version>
7373
<scope>provided</scope>
7474
</dependency>
7575
<dependency>

src/main/java/dev/timecoding/fasterascend/FasterAscend.java

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ public final class FasterAscend extends JavaPlugin {
3131
private boolean actionbardisabled = false;
3232
private List<String> legacyversions = new ArrayList<>();
3333

34+
private FAApiListener faApiListener;
35+
3436
@Override
3537
public void onEnable() {
3638
this.legacyversions.add("1.13");
@@ -54,15 +56,15 @@ public void onEnable() {
5456
Integer baseversion = Integer.valueOf(split.get(1));
5557
if(baseversion < 19){
5658
sender.sendMessage("§cInformation: To use this plugin I recommend to use the newest Minecraft-Version!");
57-
sender.sendMessage("§cTo get support OR REPORT BUGS for the legacy Minecraft-Versions join my discord: https://discord.gg/mf9JNrzh");
59+
sender.sendMessage("§cTo get support OR REPORT BUGS for the legacy Minecraft-Versions join my discord: https://discord.gg/V2wdDPktqc");
5860
}
5961
if (baseversion >= 16) {
6062
extravines = true;
6163
sender.sendMessage("§7Enabled Support for §cWeeping and Twisting Vines §7(>= Minecraft Version 1.16)");
6264
}
6365
if(baseversion >= 14){
6466
scaffhold = true;
65-
sender.sendMessage("§7Enabled Support for §cScaffholding §7(>= Minecraft Version 1.14)");
67+
sender.sendMessage("§7Enabled Support for §cScaffolding §7(>= Minecraft Version 1.14)");
6668
}
6769
if(baseversion < 14){
6870
boolean valid = false;
@@ -76,7 +78,7 @@ public void onEnable() {
7678
}
7779
}
7880
if(!valid){
79-
sender.sendMessage("§cHey, this plugin is sadly only compatible with the Minecraft versions between §f1.8 and 1.19§c! If you a version running on versions below, join my discord: https://discord.gg/mf9JNrzh");
81+
sender.sendMessage("§cHey, this plugin is sadly only compatible with the Minecraft versions between §f1.8 and 1.19§c! If you a version running on versions below, join my discord: https://discord.gg/V2wdDPktqc");
8082
disable = true;
8183
}
8284
}
@@ -100,8 +102,9 @@ public void onEnable() {
100102
}
101103

102104
PluginManager pluginManager = this.getServer().getPluginManager();
105+
this.faApiListener = new FAApiListener(this);
103106
pluginManager.registerEvents(new AscendListener(this), this);
104-
pluginManager.registerEvents(new FAApiListener(this), this);
107+
pluginManager.registerEvents(this.faApiListener, this);
105108

106109
PluginCommand command = this.getCommand("fasterascend");
107110
command.setExecutor(new FasterAscendCommand(this));
@@ -135,10 +138,6 @@ public boolean methodExists(String name){
135138
}
136139
}
137140

138-
public void checkForUpdate(){
139-
140-
}
141-
142141
public ConfigHandler getConfigHandler() {
143142
return configHandler;
144143
}
@@ -147,11 +146,19 @@ public Metrics getMetrics() {
147146
return metrics;
148147
}
149148

150-
public boolean areScaffholdingsAllowed() {
149+
public boolean areScaffoldingAllowed() {
151150
return scaffhold;
152151
}
153152

154153
public boolean areExtravinesAllowed() {
155154
return extravines;
156155
}
156+
157+
public FAApiListener getFaApiListener() {
158+
return faApiListener;
159+
}
160+
161+
public UpdateChecker getUpdateChecker() {
162+
return updateChecker;
163+
}
157164
}

src/main/java/dev/timecoding/fasterascend/config/ConfigHandler.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public ConfigHandler(FasterAscend plugin) {
2424

2525
private boolean retry = false;
2626

27-
private String newconfigversion = "1.1";
27+
private String newconfigversion = "1.3";
2828

2929
public void init() {
3030
plugin.saveDefaultConfig();
@@ -57,6 +57,7 @@ public boolean configUpdateAvailable() {
5757
}
5858

5959
public void reload() {
60+
f = new File(plugin.getDataFolder(), "config.yml");
6061
cfg = YamlConfiguration.loadConfiguration(f);
6162
}
6263

@@ -77,11 +78,6 @@ public void checkForConfigUpdate() {
7778
public void run() {
7879
plugin.saveResource("config.yml", true);
7980
reload();
80-
for (String save : quicksave.keySet()) {
81-
if (keyExists(save) && quicksave.get(save) != null && !save.equalsIgnoreCase("config-version")) {
82-
getConfig().set(save, quicksave.get(save));
83-
}
84-
}
8581
save();
8682
Bukkit.getConsoleSender().sendMessage(ChatColor.GREEN + "Config got updated!");
8783
}

0 commit comments

Comments
 (0)