Skip to content

Commit

Permalink
Editable tick numbers & update version
Browse files Browse the repository at this point in the history
  • Loading branch information
lluiscamino committed Jun 16, 2020
1 parent 8f0234f commit a655842
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>life.lluis</groupId>
<artifactId>MultiverseHardcore</artifactId>
<version>1.0</version>
<version>1.0.1</version>
<build>
<plugins>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ public class MultiverseHardcore extends JavaPlugin {
private PlayersList playersList;
private HardcoreWorldsList hardcoreWorldsList;

private int cleanWorldsTicks, enterWorldTicks;

public static MultiverseHardcore getInstance() {
return instance;
}
Expand All @@ -43,11 +45,14 @@ public void onEnable() {
getCommand("mvhc").setExecutor(new MainCommand());
getCommand("mvhchelp").setExecutor(new HelpCommand());

cleanWorldsTicks = getConfig().getInt("clean_worlds_ticks");
enterWorldTicks = getConfig().getInt("enter_world_ticks");

Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(this, new Runnable() {
public void run() {
hardcoreWorldsList.cleanWorlds();
}
}, 1);
}, cleanWorldsTicks);
}

public boolean spawnPlayer(Player player) {
Expand Down Expand Up @@ -158,7 +163,7 @@ public void run() {
}
}
}
}, 2);
}, enterWorldTicks);
} else {
player.sendMessage(getPrefix() + "You are entering a HARDCORE world, be careful!");
}
Expand Down
4 changes: 3 additions & 1 deletion src/main/resources/config.yml
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
version: 1.0
version: 1.0.1
clean_worlds_ticks: 1
enter_world_ticks: 2

0 comments on commit a655842

Please sign in to comment.