-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed boot up message, also cleaned some code up.
- Loading branch information
Showing
6 changed files
with
13 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,5 +4,4 @@ | |
*.prefs | ||
.project | ||
.classpath | ||
out/artifacts/CustomStats/CustomStats.jar | ||
*.jar | ||
/out/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,26 @@ | ||
package me.stats.CustomStats; | ||
|
||
import org.bukkit.GameMode; | ||
import org.bukkit.entity.Player; | ||
import org.bukkit.plugin.java.JavaPlugin; | ||
import java.util.HashMap; | ||
|
||
import java.util.Objects; | ||
import java.util.logging.Logger; | ||
|
||
public class CustomStats extends JavaPlugin { | ||
private Logger console; | ||
public final HashMap<Player, GameMode> gamemodelist = new HashMap<>(); | ||
public final HashMap<Player, Integer> taskidlist = new HashMap<>(); | ||
public void onEnable() { | ||
getCommand("stats").setExecutor(new StatsCommand(this)); | ||
Objects.requireNonNull(getCommand("stats")).setExecutor(new StatsCommand(this)); | ||
console = getLogger(); | ||
|
||
console.info("Loading configuration..."); | ||
console.info("Loading config."); | ||
saveDefaultConfig(); | ||
console.info("Configuration loaded."); | ||
|
||
console.info("Config loaded!"); | ||
console.info("Checking for a newer version."); | ||
new UpdateChecker(this, 88300).getVersion(version -> { | ||
if (this.getDescription().getVersion().equalsIgnoreCase(version)) { | ||
console.info("Your up to date!"); | ||
console.info("You are up to date! (v1.1.0)"); | ||
} else { | ||
console.info("There is a new update available. Download it at https://www.spigotmc.org/resources/customstats.88300/!"); | ||
} | ||
}); | ||
|
||
console.info("Successfully started!"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters