Skip to content

Commit

Permalink
Fetch latest minigamesbox
Browse files Browse the repository at this point in the history
  • Loading branch information
Tigerpanzer02 committed Jan 13, 2024
1 parent 5e21a4c commit eb2f2e3
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 14 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ repositories {


dependencies {
implementation("plugily.projects:MiniGamesBox-Classic:1.3.3-SNAPSHOT3") { isTransitive = false }
implementation("plugily.projects:MiniGamesBox-Classic:1.3.6") { isTransitive = false }
compileOnly("org.spigotmc:spigot-api:1.19.3-R0.1-SNAPSHOT")
compileOnly("org.jetbrains:annotations:24.0.1")
compileOnly(files("lib/spigot/1.8.8-R0.1.jar"))
Expand Down
12 changes: 11 additions & 1 deletion src/main/java/plugily/projects/villagedefense/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import plugily.projects.minigamesbox.classic.PluginMain;
import plugily.projects.minigamesbox.classic.handlers.setup.SetupInventory;
import plugily.projects.minigamesbox.classic.handlers.setup.categories.PluginSetupCategoryManager;
import plugily.projects.minigamesbox.classic.kits.basekits.Kit;
import plugily.projects.minigamesbox.classic.utils.configuration.ConfigUtils;
import plugily.projects.minigamesbox.classic.utils.services.metrics.Metrics;
import plugily.projects.minigamesbox.classic.utils.version.ServerVersion;
Expand Down Expand Up @@ -122,8 +123,12 @@ public void initializePluginClasses() {
}

public void addKits() {
if (!getConfigPreferences().getOption("KITS")) {
// Kits are disabled, no kits will be loaded
return;
}
long start = System.currentTimeMillis();
getDebugger().debug("Adding kits...");
getDebugger().performance("Kit", "Adding kits...");
addFileName("kits/archer");
addFileName("kits/knight");
addFileName("kits/naked");
Expand All @@ -137,6 +142,11 @@ public void addKits() {
return itemStack;
});
getKitRegistry().registerKits(optionalConfigurations);
getDebugger().debug(Level.INFO, "Kits loaded: ");
for (Kit kit : getKitRegistry().getKits()) {
getDebugger().debug(kit.getName());
}
getKitRegistry().setDefaultKit("knight");
getDebugger().debug("Kit adding finished took {0}ms", System.currentTimeMillis() - start);
}

Expand Down
28 changes: 16 additions & 12 deletions src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@ Bungee-Mode: false
Inventory-Manager: true


# Kits configuration
# A server restart is required for changes to apply
Kit:
# Should we load kits?
Enabled: true
# What is the default kit for players?
# This should be the same name as the file name of the kits file in the kits folder
Default: "knight"


Commands:
# Commands which can be used in game, remove all of them to disable (only works if Block.In-Game.Commands = true)
Whitelist:
Expand Down Expand Up @@ -83,16 +93,14 @@ Database: false

# Should we enable in game rewards? See rewards.yml for more...
# You should also check out our script engine tutorial for rewards! https://tutorial.plugily.xyz
Rewards: true


# Enable in game (eg. '[KIT][LEVEL] Tigerpanzer_02: hey') special formatting?
# Formatting is configurable in language.yml
# You can use PlaceholderAPI placeholders in chat format!
Plugin-Chat-Format: true
Rewards: false


Chat:
# Enable in game (eg. '[KIT][LEVEL] Tigerpanzer_02: hey') special formatting?
# Formatting is configurable in language.yml
# You can use PlaceholderAPI placeholders in chat format!
Format: true
Separate:
# Should we enable a separate arena chat for players inside a arena
# Useful on multi arena servers that don't want the same chat for all players on the server
Expand Down Expand Up @@ -126,10 +134,6 @@ Holidays: true
Powerups: false


# Should the plugin enable kits which can be found in kits.yml
Kits: true


# Should we create leaderboards out of the stats?
Leaderboard: true

Expand Down Expand Up @@ -259,4 +263,4 @@ Update-Notifier:
# You edited it, huh? Next time hurt yourself!
Do-Not-Edit:
File-Version: 1
Core-Version: 2
Core-Version: 3

0 comments on commit eb2f2e3

Please sign in to comment.