mirror of
https://github.com/songoda/UltimateKits.git
synced 2024-09-29 22:27:35 +02:00
Updated CMI support, fixed sound issue
This commit is contained in:
parent
e3ac861143
commit
e0f0bfa8e0
@ -4,7 +4,7 @@ stages:
|
||||
variables:
|
||||
name: "UltimateKits"
|
||||
path: "/builds/$CI_PROJECT_PATH"
|
||||
version: "2.3.20"
|
||||
version: "2.3.21"
|
||||
|
||||
build:
|
||||
stage: build
|
||||
|
@ -99,6 +99,9 @@ public class UltimateKits extends JavaPlugin {
|
||||
this.settingsManager = new SettingsManager(this);
|
||||
this.settingsManager.setupConfig();
|
||||
|
||||
new Locale(this, "en_US");
|
||||
this.locale = Locale.getLocale(getConfig().getString("System.Language Mode"));
|
||||
|
||||
new Convert(this);
|
||||
|
||||
new ParticleHandler(this);
|
||||
@ -106,9 +109,6 @@ public class UltimateKits extends JavaPlugin {
|
||||
|
||||
this.commandManager = new CommandManager(this);
|
||||
|
||||
new Locale(this, "en_US");
|
||||
this.locale = Locale.getLocale(getConfig().getString("System.Language Mode"));
|
||||
|
||||
//Running Songoda Updater
|
||||
Plugin plugin = new Plugin(this, 14);
|
||||
plugin.addModule(new LocaleModule());
|
||||
|
@ -4,10 +4,13 @@ import com.Zrips.CMI.CMI;
|
||||
import com.Zrips.CMI.Modules.Kits.Kit;
|
||||
import com.songoda.ultimatekits.UltimateKits;
|
||||
import com.songoda.ultimatekits.conversion.Hook;
|
||||
import org.bukkit.Bukkit;
|
||||
import com.songoda.ultimatekits.kit.type.KitContentCommand;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.ItemMeta;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
@ -27,6 +30,10 @@ public class CMIHook implements Hook {
|
||||
for (ItemStack item : kit.getItems()) {
|
||||
if (item != null) stacks.add(item);
|
||||
}
|
||||
|
||||
for (String command : kit.getCommands()) {
|
||||
stacks.add(new KitContentCommand(command).getItemForDisplay());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
@ -97,7 +97,7 @@ public class CrateAnimateTask extends BukkitRunnable {
|
||||
inventory.setItem(22, new ItemStack(Material.TRIPWIRE_HOOK));
|
||||
|
||||
if (!done) {
|
||||
player.playSound(player.getLocation(), plugin.getInstance().isServerVersionAtLeast(ServerVersion.V1_13) ? Sound.UI_BUTTON_CLICK : Sound.valueOf("CLICK"), 5f, 5f);
|
||||
player.playSound(player.getLocation(), plugin.getInstance().isServerVersionAtLeast(ServerVersion.V1_9) ? Sound.UI_BUTTON_CLICK : Sound.valueOf("CLICK"), 5f, 5f);
|
||||
this.items.addFirst(this.items.getLast());
|
||||
this.items.removeLast();
|
||||
}
|
||||
@ -118,7 +118,7 @@ public class CrateAnimateTask extends BukkitRunnable {
|
||||
}
|
||||
}
|
||||
|
||||
player.playSound(player.getLocation(), UltimateKits.getInstance().isServerVersionAtLeast(ServerVersion.V1_13) ? Sound.ENTITY_PLAYER_LEVELUP : Sound.valueOf("LEVEL_UP"), 10f, 10f);
|
||||
player.playSound(player.getLocation(), UltimateKits.getInstance().isServerVersionAtLeast(ServerVersion.V1_9) ? Sound.ENTITY_PLAYER_LEVELUP : Sound.valueOf("LEVEL_UP"), 10f, 10f);
|
||||
plugin.getLocale().getMessage("event.create.won")
|
||||
.processPlaceholder("item", WordUtils.capitalize(give.getType().name().toLowerCase().replace("_", " ")))
|
||||
.sendPrefixedMessage(player);
|
||||
|
Loading…
Reference in New Issue
Block a user