mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2025-01-08 08:48:02 +01:00
Replace usages of now incompatible CompatibleSound with XSound
This commit is contained in:
parent
20b0246270
commit
c44a684ecd
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.ban;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.eatthepath.uuid.FastUUID;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.config.FileManager;
|
||||
@ -78,7 +78,7 @@ public class BanManager {
|
||||
LocationUtil.teleportPlayerToSpawn(targetPlayer);
|
||||
|
||||
messageManager.sendMessage(targetPlayer, configLoad.getString("Island.Visit.Banned.Island.Message"));
|
||||
soundManager.playSound(targetPlayer, CompatibleSound.ENTITY_ENDERMAN_TELEPORT.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(targetPlayer, XSound.ENTITY_ENDERMAN_TELEPORT);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.challenge.inventory.inv;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.challenge.FabledChallenge;
|
||||
import com.songoda.skyblock.challenge.challenge.Challenge;
|
||||
import com.songoda.skyblock.challenge.challenge.ChallengeCategory;
|
||||
@ -99,7 +99,7 @@ public class ChallengeInventory implements InventoryProvider {
|
||||
// Update count
|
||||
count2 = done.getOrDefault(c, 0);
|
||||
// Play sound
|
||||
p.playSound(p.getLocation(), CompatibleSound.ENTITY_PLAYER_LEVELUP.getSound(), 1, 1);
|
||||
XSound.ENTITY_PLAYER_LEVELUP.play(p);
|
||||
// Update item
|
||||
ItemStack is2 = ic.createItem(inv.getPlayer().getUniqueId(), count2);
|
||||
// If challenge is done, add enchantment to show to player that it's done
|
||||
@ -112,7 +112,7 @@ public class ChallengeInventory implements InventoryProvider {
|
||||
// Update
|
||||
inv.updateItem(ic.getCol(), ic.getRow(), is2);
|
||||
} else {
|
||||
p.playSound(p.getLocation(), CompatibleSound.BLOCK_GLASS_BREAK.getSound(), 1, 1);
|
||||
XSound.BLOCK_GLASS_BREAK.play(p);
|
||||
}
|
||||
};
|
||||
inv.set(ic.getCol(), ic.getRow(), ClickableItem.of(is, consumer));
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.commands.admin.AddUpgradeCommand;
|
||||
import com.songoda.skyblock.command.commands.admin.AdminBank;
|
||||
@ -241,7 +241,7 @@ public class CommandManager implements CommandExecutor, TabCompleter {
|
||||
|
||||
if (!canUseHelp) {
|
||||
messageManager.sendMessage(player, languageConfigLoad.getString("Command.PermissionDenied.Island.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -256,7 +256,7 @@ public class CommandManager implements CommandExecutor, TabCompleter {
|
||||
} else {
|
||||
messageManager.sendMessage(player,
|
||||
languageConfigLoad.getString("Command.Island.Help.Integer.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -278,7 +278,7 @@ public class CommandManager implements CommandExecutor, TabCompleter {
|
||||
|
||||
if (!canUseHelp) {
|
||||
messageManager.sendMessage(player, languageConfigLoad.getString("Command.PermissionDenied.Admin.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -291,10 +291,8 @@ public class CommandManager implements CommandExecutor, TabCompleter {
|
||||
if (args[2].matches("[0-9]+")) {
|
||||
page = Integer.parseInt(args[2]);
|
||||
} else {
|
||||
messageManager.sendMessage(player,
|
||||
languageConfigLoad.getString("Command.Island.Help.Integer.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F,
|
||||
1.0F);
|
||||
messageManager.sendMessage(player, languageConfigLoad.getString("Command.Island.Help.Integer.Message"));
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -316,13 +314,13 @@ public class CommandManager implements CommandExecutor, TabCompleter {
|
||||
|
||||
if (subCommand == null) {
|
||||
messageManager.sendMessage(sender, languageConfigLoad.getString("Command.Island.Argument.Unrecognised.Message"));
|
||||
soundManager.playSound(sender, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(sender, XSound.ENTITY_VILLAGER_NO);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!subCommand.hasPermission(sender, isAdmin)) {
|
||||
messageManager.sendMessage(sender, languageConfigLoad.getString("Command.PermissionDenied." + (isAdmin ? "Admin" : "Island") + ".Message"));
|
||||
soundManager.playSound(sender, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(sender, XSound.BLOCK_ANVIL_LAND);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -472,7 +470,7 @@ public class CommandManager implements CommandExecutor, TabCompleter {
|
||||
|
||||
if (nextEndIndex <= -7) {
|
||||
this.plugin.getMessageManager().sendMessage(player, configLoad.getString("Command.Island.Help.Page.Message"));
|
||||
this.plugin.getSoundManager().playSound(player, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
this.plugin.getSoundManager().playSound(player, XSound.ENTITY_VILLAGER_NO);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -598,7 +596,7 @@ public class CommandManager implements CommandExecutor, TabCompleter {
|
||||
}
|
||||
}
|
||||
|
||||
this.plugin.getSoundManager().playSound(player, CompatibleSound.ENTITY_ARROW_HIT.getSound(), 1.0F, 1.0F);
|
||||
this.plugin.getSoundManager().playSound(player, XSound.ENTITY_ARROW_HIT);
|
||||
}
|
||||
|
||||
public void sendConsoleHelpCommands(CommandSender sender) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.admin;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.eatthepath.uuid.FastUUID;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
@ -73,17 +73,17 @@ public class AddUpgradeCommand extends SubCommand {
|
||||
|
||||
if (islandOwnerUUID == null) {
|
||||
messageManager.sendMessage(sender, configLoad.getString("Command.Island.Admin.AddUpgrade.Island.Owner.Message"));
|
||||
soundManager.playSound(sender, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(sender, XSound.ENTITY_VILLAGER_NO);
|
||||
} else if (upgrade == null) {
|
||||
messageManager.sendMessage(sender, configLoad.getString("Command.Island.Admin.AddUpgrade.Upgrade.Exist.Message"));
|
||||
soundManager.playSound(sender, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(sender, XSound.ENTITY_VILLAGER_NO);
|
||||
} else {
|
||||
if (islandManager.containsIsland(islandOwnerUUID)) {
|
||||
Island island = islandManager.getIsland(Bukkit.getServer().getOfflinePlayer(islandOwnerUUID));
|
||||
|
||||
if (island.hasUpgrade(upgrade)) {
|
||||
messageManager.sendMessage(sender, configLoad.getString("Command.Island.Admin.AddUpgrade.Upgrade.Already.Message"));
|
||||
soundManager.playSound(sender, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(sender, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -95,7 +95,7 @@ public class AddUpgradeCommand extends SubCommand {
|
||||
if (!fileManager.isFileExist(islandDataFile)) {
|
||||
messageManager.sendMessage(sender,
|
||||
configLoad.getString("Command.Island.Admin.AddUpgrade.Island.Data.Message"));
|
||||
soundManager.playSound(sender, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(sender, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -105,7 +105,7 @@ public class AddUpgradeCommand extends SubCommand {
|
||||
if (islandDataConfigLoad.getString("Upgrade." + upgrade.name()) != null) {
|
||||
messageManager.sendMessage(sender,
|
||||
configLoad.getString("Command.Island.Admin.AddUpgrade.Upgrade.Already.Message"));
|
||||
soundManager.playSound(sender, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(sender, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -122,12 +122,12 @@ public class AddUpgradeCommand extends SubCommand {
|
||||
messageManager.sendMessage(sender,
|
||||
configLoad.getString("Command.Island.Admin.AddUpgrade.Added.Message")
|
||||
.replace("%player", targetPlayerName).replace("%upgrade", upgrade.name()));
|
||||
soundManager.playSound(sender, CompatibleSound.BLOCK_NOTE_BLOCK_PLING.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(sender, XSound.BLOCK_NOTE_BLOCK_PLING);
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(sender,
|
||||
configLoad.getString("Command.Island.Admin.AddUpgrade.Invalid.Message"));
|
||||
soundManager.playSound(sender, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(sender, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
package com.songoda.skyblock.command.commands.admin;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.hooks.EconomyManager;
|
||||
import com.craftaro.core.hooks.economies.Economy;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
import com.songoda.skyblock.config.FileManager;
|
||||
@ -42,7 +42,7 @@ public class AdminBank extends SubCommand {
|
||||
|
||||
if (!this.plugin.getConfiguration().getBoolean("Island.Bank.Enable")) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Bank.Disabled.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1f, 1f);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -51,7 +51,7 @@ public class AdminBank extends SubCommand {
|
||||
this.plugin.getGuiManager().showGUI(player, new GuiBank(this.plugin, island, null, true));
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Admin.Bank.NullIsland.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1f, 1f);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
} else {
|
||||
switch (args[0].toLowerCase()) {
|
||||
@ -96,12 +96,12 @@ public class AdminBank extends SubCommand {
|
||||
this.plugin.getGuiManager().showGUI(player, new GuiBank(this.plugin, island, null, true));
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Admin.Bank.NullIsland.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1f, 1f);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Admin.Bank.Unexpected.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1f, 1f);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.admin;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
import com.songoda.skyblock.config.FileManager;
|
||||
@ -50,7 +50,7 @@ public class ChatSpyCommand extends SubCommand {
|
||||
messageManager.sendMessage(player, languageLoad.getString("Command.Island.Admin.ChatSpy.GlobalEnabled.Message"));
|
||||
} else {
|
||||
messageManager.sendMessage(player, languageLoad.getString("Command.Island.Admin.ChatSpy.GlobalAlreadyEnabled.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1f, 1f);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
break;
|
||||
case "add":
|
||||
@ -66,7 +66,7 @@ public class ChatSpyCommand extends SubCommand {
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(player, languageLoad.getString("Command.Island.Admin.ChatSpy.InvalidArgNumber.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1f, 1f);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
break;
|
||||
case "remove":
|
||||
@ -82,7 +82,7 @@ public class ChatSpyCommand extends SubCommand {
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(player, languageLoad.getString("Command.Island.Admin.ChatSpy.InvalidArgNumber.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1f, 1f);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
break;
|
||||
case "list":
|
||||
@ -100,7 +100,7 @@ public class ChatSpyCommand extends SubCommand {
|
||||
break;
|
||||
default:
|
||||
messageManager.sendMessage(player, languageLoad.getString("Command.Island.Admin.ChatSpy.InvalidArgNumber.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1f, 1f);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.admin;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
import com.songoda.skyblock.menus.admin.Creator;
|
||||
@ -24,7 +24,7 @@ public class CreateCommand extends SubCommand {
|
||||
}
|
||||
|
||||
Creator.getInstance().open(player);
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_CHEST_OPEN.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_CHEST_OPEN);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.admin;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
import com.songoda.skyblock.config.FileManager;
|
||||
@ -69,16 +69,15 @@ public class DeleteCommand extends SubCommand {
|
||||
|
||||
if (targetPlayerUUID == null || !islandManager.isIslandExist(targetPlayerUUID)) {
|
||||
messageManager.sendMessage(sender, configLoad.getString("Command.Island.Admin.Delete.Owner.Message"));
|
||||
soundManager.playSound(sender, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(sender, XSound.BLOCK_ANVIL_LAND);
|
||||
} else {
|
||||
islandManager.loadIsland(Bukkit.getServer().getOfflinePlayer(targetPlayerUUID));
|
||||
Island island = islandManager.getIsland(Bukkit.getServer().getOfflinePlayer(targetPlayerUUID));
|
||||
Location spawnLocation = LocationUtil.getSpawnLocation();
|
||||
|
||||
if (spawnLocation != null && islandManager.isLocationAtIsland(island, spawnLocation)) {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Admin.Delete.Spawn.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Admin.Delete.Spawn.Message"));
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
islandManager.unloadIsland(island, null);
|
||||
|
||||
@ -88,9 +87,8 @@ public class DeleteCommand extends SubCommand {
|
||||
for (Player all : Bukkit.getOnlinePlayers()) {
|
||||
if (island.hasRole(IslandRole.MEMBER, all.getUniqueId())
|
||||
|| island.hasRole(IslandRole.OPERATOR, all.getUniqueId())) {
|
||||
all.sendMessage(ChatColor.translateAlternateColorCodes('&',
|
||||
configLoad.getString("Command.Island.Confirmation.Deletion.Broadcast.Message")));
|
||||
soundManager.playSound(all, CompatibleSound.ENTITY_GENERIC_EXPLODE.getSound(), 10.0F, 10.0F);
|
||||
all.sendMessage(ChatColor.translateAlternateColorCodes('&', configLoad.getString("Command.Island.Confirmation.Deletion.Broadcast.Message")));
|
||||
soundManager.playSound(all, XSound.ENTITY_GENERIC_EXPLODE, 10, 10);
|
||||
}
|
||||
}
|
||||
|
||||
@ -98,11 +96,11 @@ public class DeleteCommand extends SubCommand {
|
||||
islandManager.deleteIsland(island, true);
|
||||
|
||||
messageManager.sendMessage(sender, configLoad.getString("Command.Island.Admin.Delete.Deleted.Message").replace("%player", targetPlayerName));
|
||||
soundManager.playSound(sender, CompatibleSound.ENTITY_IRON_GOLEM_ATTACK.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(sender, XSound.ENTITY_IRON_GOLEM_ATTACK);
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(sender, configLoad.getString("Command.Island.Admin.Delete.Invalid.Message"));
|
||||
soundManager.playSound(sender, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(sender, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.admin;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
import com.songoda.skyblock.config.FileManager;
|
||||
@ -32,14 +32,14 @@ public class GeneratorCommand extends SubCommand {
|
||||
|
||||
if (this.plugin.getGeneratorManager() == null) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Admin.Generator.Disabled.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else {
|
||||
if (playerDataManager.hasPlayerData(player)) {
|
||||
playerDataManager.getPlayerData(player).setViewer(null);
|
||||
}
|
||||
|
||||
Generator.getInstance().open(player);
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_CHEST_OPEN.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_CHEST_OPEN);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.admin;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
import com.songoda.skyblock.menus.admin.Levelling;
|
||||
@ -18,7 +18,7 @@ public class LevelCommand extends SubCommand {
|
||||
SoundManager soundManager = this.plugin.getSoundManager();
|
||||
|
||||
Levelling.getInstance().open(player);
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_CHEST_OPEN.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_CHEST_OPEN);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.admin;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
import com.songoda.skyblock.config.FileManager;
|
||||
@ -45,7 +45,7 @@ public class LevelScanCommand extends SubCommand {
|
||||
|
||||
if (args.length == 0) {
|
||||
messageManager.sendMessage(sender, configLoad.getString("Command.Island.Admin.LevelScan.Invalid.Message"));
|
||||
soundManager.playSound(sender, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(sender, XSound.BLOCK_ANVIL_LAND);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -54,14 +54,14 @@ public class LevelScanCommand extends SubCommand {
|
||||
|
||||
if (island == null) {
|
||||
messageManager.sendMessage(sender, configLoad.getString("Command.Island.Admin.LevelScan.NoIsland.Message"));
|
||||
soundManager.playSound(sender, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(sender, XSound.BLOCK_ANVIL_LAND);
|
||||
return;
|
||||
}
|
||||
|
||||
levellingManager.startScan(sender instanceof Player ? (Player) sender : null, island);
|
||||
|
||||
messageManager.sendMessage(sender, configLoad.getString("Command.Island.Admin.LevelScan.Started.Message"));
|
||||
soundManager.playSound(sender, CompatibleSound.ENTITY_VILLAGER_YES.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(sender, XSound.ENTITY_VILLAGER_YES);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.admin;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
import com.songoda.skyblock.config.FileManager;
|
||||
@ -61,12 +61,12 @@ public class OwnerCommand extends SubCommand {
|
||||
if (islandOwnerUUID == null) {
|
||||
messageManager.sendMessage(sender,
|
||||
configLoad.getString("Command.Island.Admin.Owner.Island.None.Message"));
|
||||
soundManager.playSound(sender, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(sender, XSound.ENTITY_VILLAGER_NO);
|
||||
} else if (islandOwnerUUID.equals(targetPlayerUUID)) {
|
||||
messageManager.sendMessage(sender,
|
||||
configLoad.getString("Command.Island.Admin.Owner.Island.Owner.Message").replace("%player",
|
||||
targetPlayerName));
|
||||
soundManager.playSound(sender, CompatibleSound.ENTITY_VILLAGER_YES.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(sender, XSound.ENTITY_VILLAGER_YES);
|
||||
} else {
|
||||
targetPlayer = Bukkit.getServer().getPlayer(islandOwnerUUID);
|
||||
|
||||
@ -79,11 +79,11 @@ public class OwnerCommand extends SubCommand {
|
||||
messageManager.sendMessage(sender,
|
||||
configLoad.getString("Command.Island.Admin.Owner.Island.Member.Message")
|
||||
.replace("%player", targetPlayerName).replace("%owner", islandOwnerName));
|
||||
soundManager.playSound(sender, CompatibleSound.ENTITY_VILLAGER_YES.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(sender, XSound.ENTITY_VILLAGER_YES);
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(sender, configLoad.getString("Command.Island.Admin.Owner.Invalid.Message"));
|
||||
soundManager.playSound(sender, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(sender, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.admin;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
import com.songoda.skyblock.config.FileManager;
|
||||
@ -52,14 +52,14 @@ public class ProxyCommand extends SubCommand {
|
||||
messageManager.sendMessage(sender,
|
||||
configLoad.getString("Command.Island.Admin.Proxy.IsOffPlayer.Message")
|
||||
.replace("%player", targetPlayerOffline.getName()));
|
||||
soundManager.playSound(sender, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(sender, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
islandManager.removeProxyingPlayer(((Player) sender).getUniqueId());
|
||||
} else {
|
||||
messageManager.sendMessage(sender,
|
||||
configLoad.getString("Command.Island.Admin.Proxy.IsOn.Message")
|
||||
.replace("%player", targetPlayerOffline.getName()));
|
||||
soundManager.playSound(sender, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(sender, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
islandManager.addProxiedPlayer(((Player) sender).getUniqueId(), userUUID);
|
||||
}
|
||||
@ -68,7 +68,7 @@ public class ProxyCommand extends SubCommand {
|
||||
messageManager.sendMessage(sender,
|
||||
configLoad.getString("Command.Island.Admin.Proxy.IsOff.Message")
|
||||
.replace("%player", ""));
|
||||
soundManager.playSound(sender, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(sender, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
islandManager.removeProxyingPlayer(((Player) sender).getUniqueId());
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.admin;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
import com.songoda.skyblock.config.FileManager;
|
||||
@ -49,7 +49,7 @@ public class RefreshHologramsCommand extends SubCommand {
|
||||
});
|
||||
|
||||
messageManager.sendMessage(sender, configLoad.getString("Command.Island.Admin.RefreshHolograms.Refreshed.Message"));
|
||||
soundManager.playSound(sender, CompatibleSound.BLOCK_NOTE_BLOCK_PLING.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(sender, XSound.BLOCK_NOTE_BLOCK_PLING);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.admin;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
import com.songoda.skyblock.config.FileManager;
|
||||
@ -104,7 +104,7 @@ public class ReloadCommand extends SubCommand {
|
||||
MenuClickRegistry.getInstance().reloadAll();
|
||||
|
||||
messageManager.sendMessage(sender, configLoad.getString("Command.Island.Admin.Reload.Reloaded.Message"));
|
||||
soundManager.playSound(sender, CompatibleSound.BLOCK_ANVIL_USE.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(sender, XSound.BLOCK_ANVIL_USE);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.admin;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
import com.songoda.skyblock.config.FileManager;
|
||||
@ -65,7 +65,7 @@ public class RemoveHologramCommand extends SubCommand {
|
||||
|
||||
if (locationsConfigLoad.getString("Location.Hologram.Leaderboard." + hologramType.name()) == null) {
|
||||
messageManager.sendMessage(sender, configLoad.getString("Command.Island.Admin.RemoveHologram.Set.Message"));
|
||||
soundManager.playSound(sender, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(sender, XSound.BLOCK_ANVIL_LAND);
|
||||
} else {
|
||||
locationsConfigLoad.set("Location.Hologram.Leaderboard." + hologramType.name(), null);
|
||||
|
||||
@ -85,7 +85,7 @@ public class RemoveHologramCommand extends SubCommand {
|
||||
});
|
||||
|
||||
messageManager.sendMessage(sender, configLoad.getString("Command.Island.Admin.RemoveHologram.Removed.Message").replace("%type", hologramType.name()));
|
||||
soundManager.playSound(sender, CompatibleSound.BLOCK_NOTE_BLOCK_PLING.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(sender, XSound.BLOCK_NOTE_BLOCK_PLING);
|
||||
}
|
||||
|
||||
return;
|
||||
@ -93,7 +93,7 @@ public class RemoveHologramCommand extends SubCommand {
|
||||
}
|
||||
|
||||
messageManager.sendMessage(sender, configLoad.getString("Command.Island.Admin.RemoveHologram.Invalid.Message"));
|
||||
soundManager.playSound(sender, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(sender, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.admin;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
import com.songoda.skyblock.config.FileManager;
|
||||
@ -73,11 +73,11 @@ public class RemoveUpgradeCommand extends SubCommand {
|
||||
if (islandOwnerUUID == null) {
|
||||
messageManager.sendMessage(sender,
|
||||
configLoad.getString("Command.Island.Admin.RemoveUpgrade.Island.Owner.Message"));
|
||||
soundManager.playSound(sender, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(sender, XSound.ENTITY_VILLAGER_NO);
|
||||
} else if (upgrade == null) {
|
||||
messageManager.sendMessage(sender,
|
||||
configLoad.getString("Command.Island.Admin.RemoveUpgrade.Upgrade.Exist.Message"));
|
||||
soundManager.playSound(sender, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(sender, XSound.ENTITY_VILLAGER_NO);
|
||||
} else {
|
||||
if (islandManager.containsIsland(islandOwnerUUID)) {
|
||||
Island island = islandManager.getIsland(Bukkit.getServer().getOfflinePlayer(islandOwnerUUID));
|
||||
@ -85,7 +85,7 @@ public class RemoveUpgradeCommand extends SubCommand {
|
||||
if (!island.hasUpgrade(upgrade)) {
|
||||
messageManager.sendMessage(sender,
|
||||
configLoad.getString("Command.Island.Admin.RemoveUpgrade.Upgrade.Missing.Message"));
|
||||
soundManager.playSound(sender, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(sender, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -98,7 +98,7 @@ public class RemoveUpgradeCommand extends SubCommand {
|
||||
if (!fileManager.isFileExist(islandDataFile)) {
|
||||
messageManager.sendMessage(sender,
|
||||
configLoad.getString("Command.Island.Admin.RemoveUpgrade.Island.Data.Message"));
|
||||
soundManager.playSound(sender, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(sender, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -108,7 +108,7 @@ public class RemoveUpgradeCommand extends SubCommand {
|
||||
if (islandDataConfigLoad.getString("Upgrade." + upgrade.name()) == null) {
|
||||
messageManager.sendMessage(sender,
|
||||
configLoad.getString("Command.Island.Admin.RemoveUpgrade.Upgrade.Missing.Message"));
|
||||
soundManager.playSound(sender, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(sender, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -125,12 +125,12 @@ public class RemoveUpgradeCommand extends SubCommand {
|
||||
messageManager.sendMessage(sender,
|
||||
configLoad.getString("Command.Island.Admin.RemoveUpgrade.Removed.Message")
|
||||
.replace("%player", targetPlayerName).replace("%upgrade", upgrade.name()));
|
||||
soundManager.playSound(sender, CompatibleSound.BLOCK_NOTE_BLOCK_PLING.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(sender, XSound.BLOCK_NOTE_BLOCK_PLING);
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(sender,
|
||||
configLoad.getString("Command.Island.Admin.RemoveUpgrade.Invalid.Message"));
|
||||
soundManager.playSound(sender, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(sender, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.admin;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
import com.songoda.skyblock.config.FileManager;
|
||||
@ -67,13 +67,13 @@ public class SetAlwaysLoadedCommand extends SubCommand {
|
||||
if (island.isAlwaysLoaded()) {
|
||||
messageManager.sendMessage(sender,
|
||||
configLoad.getString("Command.Island.Admin.SetAlwaysLoaded.IsOff.Message"));
|
||||
soundManager.playSound(sender, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(sender, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
island.setAlwaysLoaded(false);
|
||||
} else {
|
||||
messageManager.sendMessage(sender,
|
||||
configLoad.getString("Command.Island.Admin.SetAlwaysLoaded.IsOn.Message"));
|
||||
soundManager.playSound(sender, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(sender, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
island.setAlwaysLoaded(true);
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.songoda.skyblock.command.commands.admin;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleBiome;
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.biome.BiomeManager;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
@ -91,7 +91,7 @@ public class SetBiomeCommand extends SubCommand {
|
||||
|
||||
if (islandOwnerUUID == null) {
|
||||
messageManager.sendMessage(sender, configLoad.getString("Command.Island.Admin.SetBiome.Island.Owner.Message"));
|
||||
soundManager.playSound(sender, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(sender, XSound.ENTITY_VILLAGER_NO);
|
||||
} else {
|
||||
if (islandManager.containsIsland(islandOwnerUUID)) {
|
||||
Island island = islandManager.getIsland(Bukkit.getServer().getOfflinePlayer(islandOwnerUUID));
|
||||
@ -105,7 +105,7 @@ public class SetBiomeCommand extends SubCommand {
|
||||
if (island == null) {
|
||||
messageManager.sendMessage(sender,
|
||||
configLoad.getString("Command.Island.Admin.SetBiome.Island.Data.Message"));
|
||||
soundManager.playSound(sender, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(sender, XSound.BLOCK_ANVIL_LAND);
|
||||
} else {
|
||||
CompatibleBiome finalBiome = biome;
|
||||
IslandWorld finalWorld = world;
|
||||
@ -121,17 +121,15 @@ public class SetBiomeCommand extends SubCommand {
|
||||
configLoad.getString("Command.Island.Admin.SetBiome.Set.Message")
|
||||
.replace("%player", targetPlayerName)
|
||||
.replace("%biome", StringUtil.capitalizeWord(biome.getBiome().name().replaceAll("_", " "))));
|
||||
soundManager.playSound(sender, CompatibleSound.BLOCK_NOTE_BLOCK_PLING.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(sender, XSound.BLOCK_NOTE_BLOCK_PLING);
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(sender,
|
||||
configLoad.getString("Command.Island.Admin.SetBiome.InvalidBiome.Message"));
|
||||
soundManager.playSound(sender, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
messageManager.sendMessage(sender, configLoad.getString("Command.Island.Admin.SetBiome.InvalidBiome.Message"));
|
||||
soundManager.playSound(sender, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(sender,
|
||||
configLoad.getString("Command.Island.Admin.SetBiome.Invalid.Message"));
|
||||
soundManager.playSound(sender, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
messageManager.sendMessage(sender, configLoad.getString("Command.Island.Admin.SetBiome.Invalid.Message"));
|
||||
soundManager.playSound(sender, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.admin;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
import com.songoda.skyblock.config.FileManager;
|
||||
@ -64,16 +64,15 @@ public class SetHologramCommand extends SubCommand {
|
||||
hologramManager.spawnHologram(hologramType1);
|
||||
});
|
||||
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Admin.SetHologram.Set.Message").replace("%type", hologramType.name()));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_NOTE_BLOCK_PLING.getSound(), 1.0F, 1.0F);
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Admin.SetHologram.Set.Message").replace("%type", hologramType.name()));
|
||||
soundManager.playSound(player, XSound.BLOCK_NOTE_BLOCK_PLING);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Admin.SetHologram.Invalid.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.admin;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.craftaro.core.utils.NumberUtils;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
@ -66,17 +66,14 @@ public class SetMaxMembers extends SubCommand {
|
||||
int maxMembers = Integer.parseInt(args[1]);
|
||||
|
||||
if (islandOwnerUUID == null) {
|
||||
messageManager.sendMessage(sender,
|
||||
configLoad.getString("Command.Island.Admin.SetMaxMembers.Island.Owner.Message"));
|
||||
soundManager.playSound(sender, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
messageManager.sendMessage(sender, configLoad.getString("Command.Island.Admin.SetMaxMembers.Island.Owner.Message"));
|
||||
soundManager.playSound(sender, XSound.ENTITY_VILLAGER_NO);
|
||||
} else if (maxMembers <= 0) {
|
||||
messageManager.sendMessage(sender,
|
||||
configLoad.getString("Command.Island.Admin.SetMaxMembers.Members.Greater.Message"));
|
||||
soundManager.playSound(sender, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
messageManager.sendMessage(sender, configLoad.getString("Command.Island.Admin.SetMaxMembers.Members.Greater.Message"));
|
||||
soundManager.playSound(sender, XSound.ENTITY_VILLAGER_NO);
|
||||
} else if (maxMembers > 100000) {
|
||||
messageManager.sendMessage(sender,
|
||||
configLoad.getString("Command.Island.Admin.SetMaxMembers.Members.Less.Message"));
|
||||
soundManager.playSound(sender, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
messageManager.sendMessage(sender, configLoad.getString("Command.Island.Admin.SetMaxMembers.Members.Less.Message"));
|
||||
soundManager.playSound(sender, XSound.ENTITY_VILLAGER_NO);
|
||||
} else {
|
||||
if (islandManager.containsIsland(islandOwnerUUID)) {
|
||||
Island island = islandManager.getIsland(Bukkit.getServer().getOfflinePlayer(islandOwnerUUID));
|
||||
@ -86,19 +83,16 @@ public class SetMaxMembers extends SubCommand {
|
||||
islandManager.updateBorder(island);
|
||||
}
|
||||
} else {
|
||||
File islandDataFile = new File(this.plugin.getDataFolder().toString() + "/island-data",
|
||||
islandOwnerUUID.toString() + ".yml");
|
||||
File islandDataFile = new File(this.plugin.getDataFolder() + "/island-data", islandOwnerUUID + ".yml");
|
||||
|
||||
if (!fileManager.isFileExist(islandDataFile)) {
|
||||
messageManager.sendMessage(sender,
|
||||
configLoad.getString("Command.Island.Admin.SetMaxMembers.Island.Data.Message"));
|
||||
soundManager.playSound(sender, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
messageManager.sendMessage(sender, configLoad.getString("Command.Island.Admin.SetMaxMembers.Island.Data.Message"));
|
||||
soundManager.playSound(sender, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
FileConfiguration islandDataConfigLoad = YamlConfiguration
|
||||
.loadConfiguration(islandDataFile);
|
||||
FileConfiguration islandDataConfigLoad = YamlConfiguration.loadConfiguration(islandDataFile);
|
||||
islandDataConfigLoad.set("MaxMembers", maxMembers);
|
||||
|
||||
try {
|
||||
@ -112,17 +106,15 @@ public class SetMaxMembers extends SubCommand {
|
||||
configLoad.getString("Command.Island.Admin.SetMaxMembers.Set.Message")
|
||||
.replace("%player", targetPlayerName)
|
||||
.replace("%maxMembers", NumberUtils.formatNumber(maxMembers)));
|
||||
soundManager.playSound(sender, CompatibleSound.BLOCK_NOTE_BLOCK_PLING.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(sender, XSound.BLOCK_NOTE_BLOCK_PLING);
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(sender,
|
||||
configLoad.getString("Command.Island.Admin.SetMaxMembers.Numerical.Message"));
|
||||
soundManager.playSound(sender, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
messageManager.sendMessage(sender, configLoad.getString("Command.Island.Admin.SetMaxMembers.Numerical.Message"));
|
||||
soundManager.playSound(sender, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(sender,
|
||||
configLoad.getString("Command.Island.Admin.SetMaxMembers.Invalid.Message"));
|
||||
soundManager.playSound(sender, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
messageManager.sendMessage(sender, configLoad.getString("Command.Island.Admin.SetMaxMembers.Invalid.Message"));
|
||||
soundManager.playSound(sender, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.admin;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.craftaro.core.utils.NumberUtils;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
@ -68,15 +68,15 @@ public class SetSizeCommand extends SubCommand {
|
||||
if (islandOwnerUUID == null) {
|
||||
messageManager.sendMessage(sender,
|
||||
configLoad.getString("Command.Island.Admin.SetSize.Island.Owner.Message"));
|
||||
soundManager.playSound(sender, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(sender, XSound.ENTITY_VILLAGER_NO);
|
||||
} else if (size < 20) {
|
||||
messageManager.sendMessage(sender,
|
||||
configLoad.getString("Command.Island.Admin.SetSize.Size.Greater.Message"));
|
||||
soundManager.playSound(sender, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(sender, XSound.ENTITY_VILLAGER_NO);
|
||||
} else if (size > 1000) {
|
||||
messageManager.sendMessage(sender,
|
||||
configLoad.getString("Command.Island.Admin.SetSize.Size.Less.Message"));
|
||||
soundManager.playSound(sender, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(sender, XSound.ENTITY_VILLAGER_NO);
|
||||
} else {
|
||||
if (islandManager.containsIsland(islandOwnerUUID)) {
|
||||
Island island = islandManager
|
||||
@ -92,7 +92,7 @@ public class SetSizeCommand extends SubCommand {
|
||||
if (!fileManager.isFileExist(islandDataFile)) {
|
||||
messageManager.sendMessage(sender,
|
||||
configLoad.getString("Command.Island.Admin.SetSize.Island.Data.Message"));
|
||||
soundManager.playSound(sender, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(sender, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -112,17 +112,15 @@ public class SetSizeCommand extends SubCommand {
|
||||
configLoad.getString("Command.Island.Admin.SetSize.Set.Message")
|
||||
.replace("%player", targetPlayerName)
|
||||
.replace("%size", NumberUtils.formatNumber(size)));
|
||||
soundManager.playSound(sender, CompatibleSound.BLOCK_NOTE_BLOCK_PLING.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(sender, XSound.BLOCK_NOTE_BLOCK_PLING);
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(sender,
|
||||
configLoad.getString("Command.Island.Admin.SetSize.Numerical.Message"));
|
||||
soundManager.playSound(sender, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
messageManager.sendMessage(sender, configLoad.getString("Command.Island.Admin.SetSize.Numerical.Message"));
|
||||
soundManager.playSound(sender, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(sender,
|
||||
configLoad.getString("Command.Island.Admin.SetSize.Invalid.Message"));
|
||||
soundManager.playSound(sender, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
messageManager.sendMessage(sender, configLoad.getString("Command.Island.Admin.SetSize.Invalid.Message"));
|
||||
soundManager.playSound(sender, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.admin;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
import com.songoda.skyblock.config.FileManager;
|
||||
@ -30,7 +30,7 @@ public class SetSpawnCommand extends SubCommand {
|
||||
fileManager.setLocation(fileManager.getConfig(new File(this.plugin.getDataFolder(), "locations.yml")),
|
||||
"Location.Spawn", player.getLocation(), true);
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Admin.SetSpawn.Set.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_PLAYER_LEVELUP.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_PLAYER_LEVELUP);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.admin;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
import com.songoda.skyblock.gui.permissions.GuiPermissionsSelector;
|
||||
@ -18,7 +18,7 @@ public class SettingsCommand extends SubCommand {
|
||||
SoundManager soundManager = this.plugin.getSoundManager();
|
||||
|
||||
this.plugin.getGuiManager().showGUI(player, new GuiPermissionsSelector(this.plugin, player, null, null));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_CHEST_OPEN.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_CHEST_OPEN);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.admin;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
import com.songoda.skyblock.config.FileManager.Config;
|
||||
@ -112,7 +112,7 @@ public class StructureCommand extends SubCommand {
|
||||
}
|
||||
}
|
||||
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_ARROW_HIT.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_ARROW_HIT);
|
||||
} else {
|
||||
if (args[0].equalsIgnoreCase("tool")) {
|
||||
try {
|
||||
@ -124,7 +124,7 @@ public class StructureCommand extends SubCommand {
|
||||
.getItemMeta().getDisplayName().equals(is.getItemMeta().getDisplayName()))) {
|
||||
messageManager.sendMessage(player, configLoad
|
||||
.getString("Command.Island.Admin.Structure.Tool.Inventory.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -134,11 +134,11 @@ public class StructureCommand extends SubCommand {
|
||||
player.getInventory().addItem(is);
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Admin.Structure.Tool.Equiped.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_CHICKEN_EGG.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_CHICKEN_EGG);
|
||||
} catch (Exception e) {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Island.Structure.Tool.Material.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
Bukkit.getServer().getLogger().log(Level.WARNING,
|
||||
"SkyBlock | Error: The defined material in the configuration file for the Structure selection tool could not be found.");
|
||||
@ -155,51 +155,47 @@ public class StructureCommand extends SubCommand {
|
||||
if (position1Location == null && position2Location == null) {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Admin.Structure.Save.Position.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else if ((position1Location == null && position2Location != null)
|
||||
|| (position1Location != null && position2Location == null)) {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Admin.Structure.Save.Complete.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else if (!position1Location.getWorld().getName()
|
||||
.equals(position2Location.getWorld().getName())) {
|
||||
messageManager.sendMessage(player, configLoad
|
||||
.getString("Command.Island.Admin.Structure.Save.Selection.World.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else if (!player.getWorld().getName().equals(position1Location.getWorld().getName())) {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Admin.Structure.Save.Player.World.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else if (!LocationUtil.isInsideArea(player.getLocation(), position1Location,
|
||||
position2Location)) {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Admin.Structure.Save.Player.Area.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else {
|
||||
try {
|
||||
File configFile = new File(
|
||||
this.plugin.getDataFolder().toString() + "/structures/" + args[1] + ".structure");
|
||||
this.plugin.getDataFolder() + "/structures/" + args[1] + ".structure");
|
||||
StructureUtil.saveStructure(configFile, player.getLocation(),
|
||||
StructureUtil.getFixedLocations(position1Location, position2Location));
|
||||
|
||||
messageManager.sendMessage(player,
|
||||
configLoad
|
||||
.getString(
|
||||
"Command.Island.Admin.Structure.Save.Saved.Successful.Message")
|
||||
configLoad.getString("Command.Island.Admin.Structure.Save.Saved.Successful.Message")
|
||||
.replace("%name", args[1]));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_YES.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_VILLAGER_YES);
|
||||
return;
|
||||
} catch (Exception ex) {
|
||||
messageManager.sendMessage(player, configLoad
|
||||
.getString("Command.Island.Admin.Structure.Save.Saved.Failed.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Admin.Structure.Save.Saved.Failed.Message"));
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Admin.Structure.Save.Invalid.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Admin.Structure.Save.Invalid.Message"));
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
|
||||
|
||||
@ -210,7 +206,7 @@ public class StructureCommand extends SubCommand {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Admin.Structure.Convert.Invalid.Message")
|
||||
.replace("%name", args[1]));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
return;
|
||||
}
|
||||
byte[] content = new byte[(int) structureFile.length()];
|
||||
@ -231,25 +227,25 @@ public class StructureCommand extends SubCommand {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Admin.Structure.Convert.Converted.Failed.Message")
|
||||
.replace("%name", args[1]));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
ex.printStackTrace();
|
||||
}
|
||||
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Admin.Structure.Convert.Converted.Successful.Message")
|
||||
.replace("%name", args[1]));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_YES.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_VILLAGER_YES);
|
||||
|
||||
} else {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Admin.Structure.Convert.Invalid.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
|
||||
return;
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Argument.Unrecognised.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_VILLAGER_NO);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.admin;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
import com.songoda.skyblock.config.FileManager;
|
||||
@ -40,7 +40,7 @@ public class UpdateAllIslandsCommand extends SubCommand {
|
||||
|
||||
if (args.length < 1) {
|
||||
messageManager.sendMessage(sender, configLoad.getString("Command.Island.Admin.UpdateAllIslands.NoArgs.Message"));
|
||||
soundManager.playSound(sender, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1f, 1f);
|
||||
soundManager.playSound(sender, XSound.BLOCK_ANVIL_LAND);
|
||||
} else {
|
||||
switch (args[0].toLowerCase()) {
|
||||
case "setsize":
|
||||
@ -75,7 +75,7 @@ public class UpdateAllIslandsCommand extends SubCommand {
|
||||
return;
|
||||
default:
|
||||
messageManager.sendMessage(sender, configLoad.getString("Command.Island.Admin.UpdateAllIslands.Unexpected.Message"));
|
||||
soundManager.playSound(sender, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1f, 1f);
|
||||
soundManager.playSound(sender, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.admin;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
import com.songoda.skyblock.config.FileManager;
|
||||
@ -32,13 +32,12 @@ public class UpgradeCommand extends SubCommand {
|
||||
|
||||
if (this.plugin.getUpgradeManager() == null) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Admin.Upgrade.Disabled.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else {
|
||||
if (playerDataManager.hasPlayerData(player)) {
|
||||
playerDataManager.getPlayerData(player)
|
||||
.setViewer(new Upgrade.Viewer(Upgrade.Viewer.Type.UPGRADES, null));
|
||||
playerDataManager.getPlayerData(player).setViewer(new Upgrade.Viewer(Upgrade.Viewer.Type.UPGRADES, null));
|
||||
Upgrade.getInstance().open(player);
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_CHEST_OPEN.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_CHEST_OPEN);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.island;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.api.event.player.PlayerIslandJoinEvent;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
@ -85,13 +85,13 @@ public class AcceptCommand extends SubCommand {
|
||||
messageManager.sendMessage(targetPlayer,
|
||||
configLoad.getString("Command.Island.Accept.Accepted.Target.Message")
|
||||
.replace("%player", player.getName()));
|
||||
soundManager.playSound(targetPlayer, CompatibleSound.ENTITY_PLAYER_LEVELUP.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(targetPlayer, XSound.ENTITY_PLAYER_LEVELUP);
|
||||
}
|
||||
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Accept.Accepted.Sender.Message")
|
||||
.replace("%player", invite.getSenderName()));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_PLAYER_LEVELUP.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_PLAYER_LEVELUP);
|
||||
|
||||
playerData.setPlaytime(0);
|
||||
playerData.setOwner(invite.getOwnerUUID());
|
||||
@ -115,11 +115,9 @@ public class AcceptCommand extends SubCommand {
|
||||
if (targetInvitePlayer != null) {
|
||||
targetInvitePlayer
|
||||
.sendMessage(ChatColor.translateAlternateColorCodes('&',
|
||||
configLoad.getString(
|
||||
"Command.Island.Accept.Capacity.Broadcast.Message")
|
||||
configLoad.getString("Command.Island.Accept.Capacity.Broadcast.Message")
|
||||
.replace("%player", targetInvite.getSenderName())));
|
||||
soundManager.playSound(targetInvitePlayer,
|
||||
CompatibleSound.ENTITY_IRON_GOLEM_ATTACK.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(targetInvitePlayer, XSound.ENTITY_IRON_GOLEM_ATTACK);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -139,8 +137,7 @@ public class AcceptCommand extends SubCommand {
|
||||
.getString(
|
||||
"Command.Island.Accept.Accepted.Broadcast.Message")
|
||||
.replace("%player", player.getName())));
|
||||
soundManager.playSound(loopPlayer, CompatibleSound.ENTITY_FIREWORK_ROCKET_BLAST.getSound(), 1.0F,
|
||||
1.0F);
|
||||
soundManager.playSound(loopPlayer, XSound.ENTITY_FIREWORK_ROCKET_BLAST);
|
||||
|
||||
|
||||
if (island.getRole(IslandRole.MEMBER).size() == 1 && island.getRole(IslandRole.OPERATOR).isEmpty()) {
|
||||
@ -155,19 +152,19 @@ public class AcceptCommand extends SubCommand {
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Accept.Owner.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Accept.Invited.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Accept.Invite.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Accept.Invalid.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.island;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.ban.Ban;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
@ -44,7 +44,7 @@ public class BanCommand extends SubCommand {
|
||||
|
||||
if (island == null) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Ban.Owner.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else if (this.plugin.getConfiguration().getBoolean("Island.Visitor.Banning")) {
|
||||
if (island.hasRole(IslandRole.OWNER, player.getUniqueId())
|
||||
|| (island.hasRole(IslandRole.OPERATOR, player.getUniqueId()) && permissionManager.hasPermission(island, "Ban", IslandRole.OPERATOR))) {
|
||||
@ -64,24 +64,24 @@ public class BanCommand extends SubCommand {
|
||||
|
||||
if (targetPlayerUUID == null) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Ban.Found.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else if (targetPlayer != null && (targetPlayer.hasPermission("fabledskyblock.bypass.ban") || targetPlayer.isOp())) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Ban.Exempt"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else if (targetPlayerUUID.equals(player.getUniqueId())) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Ban.Yourself.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else if (island.hasRole(IslandRole.MEMBER, targetPlayerUUID) || island.hasRole(IslandRole.OPERATOR, targetPlayerUUID)
|
||||
|| island.hasRole(IslandRole.OWNER, targetPlayerUUID)) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Ban.Member.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else if (island.getBan().isBanned(targetPlayerUUID)) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Ban.Already.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Ban.Banned.Sender.Message")
|
||||
.replace("%player", targetPlayerName));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_IRON_GOLEM_ATTACK.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_IRON_GOLEM_ATTACK);
|
||||
|
||||
if (island.isCoopPlayer(targetPlayerUUID)) {
|
||||
island.removeCoopPlayer(targetPlayerUUID);
|
||||
@ -95,7 +95,7 @@ public class BanCommand extends SubCommand {
|
||||
if (islandManager.isPlayerAtIsland(island, targetPlayer)) {
|
||||
messageManager.sendMessage(targetPlayer, configLoad.getString("Command.Island.Ban.Banned.Target.Message")
|
||||
.replace("%player", player.getName()));
|
||||
soundManager.playSound(targetPlayer, CompatibleSound.ENTITY_IRON_GOLEM_ATTACK.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(targetPlayer, XSound.ENTITY_IRON_GOLEM_ATTACK);
|
||||
|
||||
LocationUtil.teleportPlayerToSpawn(targetPlayer);
|
||||
}
|
||||
@ -103,15 +103,15 @@ public class BanCommand extends SubCommand {
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Ban.Permission.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_VILLAGER_NO);
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Ban.Disabled.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Ban.Invalid.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.island;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
import com.songoda.skyblock.config.FileManager;
|
||||
@ -33,7 +33,7 @@ public class BankCommand extends SubCommand {
|
||||
|
||||
if (!this.plugin.getConfiguration().getBoolean("Island.Bank.Enable")) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Bank.Disabled.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -41,7 +41,7 @@ public class BankCommand extends SubCommand {
|
||||
island = islandManager.getIsland(player);
|
||||
|
||||
if (island == null) {
|
||||
this.plugin.getSoundManager().playSound(player, CompatibleSound.BLOCK_GLASS_BREAK.getSound(), 1.0F, 1.0F);
|
||||
this.plugin.getSoundManager().playSound(player, XSound.BLOCK_GLASS_BREAK);
|
||||
this.plugin.getMessageManager().sendMessage(player, configLoad.getString("Command.Bank.Unknown"));
|
||||
return;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.island;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
import com.songoda.skyblock.config.FileManager.Config;
|
||||
@ -32,20 +32,20 @@ public class BansCommand extends SubCommand {
|
||||
|
||||
if (island == null) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Bans.Owner.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else if ((island.hasRole(IslandRole.OPERATOR, player.getUniqueId())
|
||||
&& this.plugin.getPermissionManager().hasPermission(island, "Unban", IslandRole.OPERATOR))
|
||||
|| island.hasRole(IslandRole.OWNER, player.getUniqueId())) {
|
||||
if (island.getBan().getBans().isEmpty()) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Bans.Bans.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else {
|
||||
Bans.getInstance().open(player);
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_CHEST_OPEN.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_CHEST_OPEN);
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Bans.Permission.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_VILLAGER_NO);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.island;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.biome.BiomeManager;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
@ -37,20 +37,20 @@ public class BiomeCommand extends SubCommand {
|
||||
|
||||
if (island == null) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Biome.Owner.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else if ((island.hasRole(IslandRole.OPERATOR, player.getUniqueId())
|
||||
&& this.plugin.getPermissionManager().hasPermission(island, "Biome", IslandRole.OPERATOR))
|
||||
|| island.hasRole(IslandRole.OWNER, player.getUniqueId())) {
|
||||
if (biomeManager.isUpdating(island)) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Biome.InProgress.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_VILLAGER_NO);
|
||||
} else {
|
||||
this.plugin.getGuiManager().showGUI(player, new GuiBiome(this.plugin, player, island, IslandWorld.NORMAL, null, false)); // TODO Nether and End support
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_CHEST_OPEN.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_CHEST_OPEN);
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Biome.Permission.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_VILLAGER_NO);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.island;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
import com.songoda.skyblock.config.FileManager;
|
||||
@ -38,21 +38,21 @@ public class BorderCommand extends SubCommand {
|
||||
|
||||
if (island == null) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Border.Owner.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else if ((island.hasRole(IslandRole.OPERATOR, player.getUniqueId())
|
||||
&& permissionManager.hasPermission(island, "Border", IslandRole.OPERATOR))
|
||||
|| island.hasRole(IslandRole.OWNER, player.getUniqueId())) {
|
||||
if (this.plugin.getConfiguration()
|
||||
.getBoolean("Island.WorldBorder.Enable")) {
|
||||
Border.getInstance().open(player);
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_CHEST_OPEN.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_CHEST_OPEN);
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Border.Disabled.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Border.Permission.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_VILLAGER_NO);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.island;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
import com.songoda.skyblock.config.FileManager.Config;
|
||||
@ -38,7 +38,7 @@ public class CancelCommand extends SubCommand {
|
||||
|
||||
if (island == null) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Cancel.Owner.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_VILLAGER_NO);
|
||||
} else if (island.hasRole(IslandRole.OWNER, player.getUniqueId())
|
||||
|| island.hasRole(IslandRole.OPERATOR, player.getUniqueId())) {
|
||||
String playerName = args[0];
|
||||
@ -46,38 +46,36 @@ public class CancelCommand extends SubCommand {
|
||||
|
||||
if (targetPlayer == null) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Cancel.Offline.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else if (island.hasRole(IslandRole.MEMBER, targetPlayer.getUniqueId())
|
||||
|| island.hasRole(IslandRole.OPERATOR, targetPlayer.getUniqueId())
|
||||
|| island.hasRole(IslandRole.OWNER, targetPlayer.getUniqueId())) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Cancel.Member.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else if (inviteManager.hasInvite(targetPlayer.getUniqueId())) {
|
||||
Invite invite = inviteManager.getInvite(targetPlayer.getUniqueId());
|
||||
|
||||
if (invite.getOwnerUUID().equals(island.getOwnerUUID())) {
|
||||
inviteManager.removeInvite(targetPlayer.getUniqueId());
|
||||
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Cancel.Cancelled.Message").replace("%player",
|
||||
targetPlayer.getName()));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_GENERIC_EXPLODE.getSound(), 10.0F, 10.0F);
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Cancel.Cancelled.Message").replace("%player", targetPlayer.getName()));
|
||||
soundManager.playSound(player, XSound.ENTITY_GENERIC_EXPLODE, 10, 10);
|
||||
} else {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Cancel.Invited.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Cancel.Invited.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Cancel.Permission.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_VILLAGER_NO);
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Cancel.Invalid.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.island;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.challenge.FabledChallenge;
|
||||
import com.songoda.skyblock.challenge.challenge.Challenge;
|
||||
@ -34,18 +34,16 @@ public class ChallengeCommand extends SubCommand {
|
||||
FileConfiguration langConfigLoad = langConfig.getFileConfiguration();
|
||||
|
||||
// Not loaded
|
||||
if (!this.plugin.getConfiguration()
|
||||
.getBoolean("Island.Challenge.Enable")) {
|
||||
if (!this.plugin.getConfiguration().getBoolean("Island.Challenge.Enable")) {
|
||||
messageManager.sendMessage(player, langConfigLoad.getString("Command.Island.Challenge.Disabled.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
return;
|
||||
}
|
||||
if (args.length == 0) {
|
||||
if (this.plugin.getConfiguration()
|
||||
.getBoolean("Island.Challenge.PerIsland")) {
|
||||
if (this.plugin.getConfiguration().getBoolean("Island.Challenge.PerIsland")) {
|
||||
if (islandManager.getIsland(player) == null) {
|
||||
messageManager.sendMessage(player, langConfigLoad.getString("Command.Island.Challenge.NoIsland.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -53,9 +51,8 @@ public class ChallengeCommand extends SubCommand {
|
||||
// Open challenge inventory
|
||||
ChallengeCategory cc = fabledChallenge.getChallengeManager().getChallenge(1);
|
||||
if (cc == null) {
|
||||
messageManager.sendMessage(player,
|
||||
langConfigLoad.getString("Command.Island.Challenge.NotFound.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
messageManager.sendMessage(player, langConfigLoad.getString("Command.Island.Challenge.NotFound.Message"));
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
return;
|
||||
}
|
||||
fabledChallenge.openChallengeInventory(player, fabledChallenge.getChallengeManager().getChallenge(1));
|
||||
@ -71,27 +68,26 @@ public class ChallengeCommand extends SubCommand {
|
||||
} catch (NumberFormatException ex) {
|
||||
messageManager.sendMessage(player,
|
||||
langConfigLoad.getString("Command.Island.Challenge.Invalid.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_HURT.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_VILLAGER_HURT);
|
||||
return;
|
||||
}
|
||||
ChallengeCategory cc = fabledChallenge.getChallengeManager().getChallenge(ccId);
|
||||
if (cc == null) {
|
||||
messageManager.sendMessage(player,
|
||||
langConfigLoad.getString("Command.Island.Challenge.CategoryNotFound.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_HURT.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_VILLAGER_HURT);
|
||||
return;
|
||||
}
|
||||
Challenge c = cc.getChallenge(cId);
|
||||
if (c == null) {
|
||||
messageManager.sendMessage(player,
|
||||
langConfigLoad.getString("Command.Island.Challenge.ChallengeNotFound.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_HURT.getSound(), 1.0F, 1.0F);
|
||||
messageManager.sendMessage(player, langConfigLoad.getString("Command.Island.Challenge.ChallengeNotFound.Message"));
|
||||
soundManager.playSound(player, XSound.ENTITY_VILLAGER_HURT);
|
||||
return;
|
||||
}
|
||||
if (fabledChallenge.getPlayerManager().doChallenge(player, c)) { // Ok
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_PLAYER_LEVELUP.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_PLAYER_LEVELUP);
|
||||
} else {
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_GLASS_BREAK.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_GLASS_BREAK);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.island;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.api.event.player.PlayerIslandChatEvent;
|
||||
import com.songoda.skyblock.api.event.player.PlayerIslandChatSwitchEvent;
|
||||
@ -45,26 +45,26 @@ public class ChatCommand extends SubCommand {
|
||||
playerData.setChat(false);
|
||||
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Chat.Untoggled.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_IRON_GOLEM_ATTACK.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_IRON_GOLEM_ATTACK);
|
||||
return;
|
||||
}
|
||||
|
||||
if (island == null) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Chat.Owner.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else if ((island.getRole(IslandRole.MEMBER).size() + island.getRole(IslandRole.OPERATOR).size()) == 0) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Chat.Team.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else if ((islandManager.getMembersOnline(island).size() - 1) <= 0) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Chat.Offline.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else {
|
||||
Bukkit.getServer().getPluginManager()
|
||||
.callEvent(new PlayerIslandChatSwitchEvent(player, island.getAPIWrapper(), true));
|
||||
playerData.setChat(true);
|
||||
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Chat.Toggled.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_NOTE_BLOCK_PLING.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_NOTE_BLOCK_PLING);
|
||||
}
|
||||
} else {
|
||||
if (playerDataManager.hasPlayerData(player)) {
|
||||
@ -81,7 +81,7 @@ public class ChatCommand extends SubCommand {
|
||||
});
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Chat.Owner.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.island;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
import com.songoda.skyblock.config.FileManager.Config;
|
||||
@ -34,7 +34,7 @@ public class CloseCommand extends SubCommand {
|
||||
|
||||
if (island == null) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Close.Owner.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else if (island.hasRole(IslandRole.OWNER, player.getUniqueId())
|
||||
|| (island.hasRole(IslandRole.OPERATOR, player.getUniqueId())
|
||||
&& this.plugin.getPermissionManager().hasPermission(island, "Visitor", IslandRole.OPERATOR))) {
|
||||
@ -42,14 +42,14 @@ public class CloseCommand extends SubCommand {
|
||||
islandManager.closeIsland(island);
|
||||
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Close.Closed.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_WOODEN_DOOR_CLOSE.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_WOODEN_DOOR_CLOSE);
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Close.Already.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Close.Permission.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_VILLAGER_NO);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.songoda.skyblock.command.commands.island;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.hooks.economies.Economy;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
import com.songoda.skyblock.config.FileManager;
|
||||
@ -57,9 +57,8 @@ public class ConfirmCommand extends SubCommand {
|
||||
Island island = islandManager.getIsland(player);
|
||||
|
||||
if (island == null) {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Confirmation.Owner.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Confirmation.Owner.Message"));
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else {
|
||||
Confirmation confirmation = playerData.getConfirmation();
|
||||
|
||||
@ -81,10 +80,8 @@ public class ConfirmCommand extends SubCommand {
|
||||
targetPlayerName = new OfflinePlayer(targetPlayerUUID).getName();
|
||||
} else {
|
||||
targetPlayerName = targetPlayer.getName();
|
||||
messageManager.sendMessage(targetPlayer, configLoad
|
||||
.getString("Command.Island.Confirmation.Ownership.Assigned.Message"));
|
||||
soundManager.playSound(targetPlayer, CompatibleSound.BLOCK_ANVIL_USE.getSound(), 1.0F,
|
||||
1.0F);
|
||||
messageManager.sendMessage(targetPlayer, configLoad.getString("Command.Island.Confirmation.Ownership.Assigned.Message"));
|
||||
soundManager.playSound(targetPlayer, XSound.BLOCK_ANVIL_USE);
|
||||
}
|
||||
|
||||
for (Player all : Bukkit.getOnlinePlayers()) {
|
||||
@ -94,10 +91,9 @@ public class ConfirmCommand extends SubCommand {
|
||||
|| island.hasRole(IslandRole.OWNER, all.getUniqueId()))
|
||||
&& (!all.getUniqueId().equals(targetPlayerUUID))) {
|
||||
all.sendMessage(ChatColor.translateAlternateColorCodes('&',
|
||||
configLoad.getString(
|
||||
"Command.Island.Ownership.Assigned.Broadcast.Message")
|
||||
configLoad.getString("Command.Island.Ownership.Assigned.Broadcast.Message")
|
||||
.replace("%player", targetPlayerName)));
|
||||
soundManager.playSound(all, CompatibleSound.BLOCK_ANVIL_USE.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(all, XSound.BLOCK_ANVIL_USE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -112,7 +108,7 @@ public class ConfirmCommand extends SubCommand {
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad
|
||||
.getString("Command.Island.Confirmation.Ownership.Member.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
Bukkit.getScheduler().runTask(this.plugin, () -> {
|
||||
scoreboardManager.updatePlayerScoreboardType(player);
|
||||
@ -127,7 +123,7 @@ public class ConfirmCommand extends SubCommand {
|
||||
if (island.getStatus() == IslandStatus.OPEN) {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Confirmation.Deletion.Open.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else {
|
||||
Location spawnLocation = LocationUtil.getSpawnLocation();
|
||||
|
||||
@ -135,7 +131,7 @@ public class ConfirmCommand extends SubCommand {
|
||||
&& islandManager.isLocationAtIsland(island, spawnLocation)) {
|
||||
messageManager.sendMessage(player, configLoad
|
||||
.getString("Command.Island.Confirmation.Deletion.Spawn.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -151,11 +147,9 @@ public class ConfirmCommand extends SubCommand {
|
||||
economy.withdrawBalance(player, deletionCost);
|
||||
} else {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString(
|
||||
"Command.Island.Confirmation.Deletion.Money.Message")
|
||||
configLoad.getString("Command.Island.Confirmation.Deletion.Money.Message")
|
||||
.replace("%cost", "" + deletionCost));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F,
|
||||
1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -174,17 +168,17 @@ public class ConfirmCommand extends SubCommand {
|
||||
all.sendMessage(
|
||||
ChatColor.translateAlternateColorCodes('&', configLoad.getString(
|
||||
"Command.Island.Confirmation.Deletion.Broadcast.Message")));
|
||||
soundManager.playSound(all, CompatibleSound.ENTITY_GENERIC_EXPLODE.getSound(), 10.0F, 10.0F);
|
||||
soundManager.playSound(all, XSound.ENTITY_GENERIC_EXPLODE, 10, 10);
|
||||
}
|
||||
}
|
||||
|
||||
if (islandManager.deleteIsland(island, false)) {
|
||||
island.setDeleted(true);
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Confirmation.Deletion.Sender.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_GENERIC_EXPLODE.getSound(), 10.0F, 10.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_GENERIC_EXPLODE, 10, 10);
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Confirmation.Deletion.Sender.MaxDeletionMessage"));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1f, 1f);
|
||||
soundManager.playSound(player, XSound.ENTITY_VILLAGER_NO, 1, 1);
|
||||
}
|
||||
}
|
||||
Bukkit.getScheduler().runTask(this.plugin, () -> {
|
||||
@ -194,17 +188,17 @@ public class ConfirmCommand extends SubCommand {
|
||||
} else {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Confirmation.Role.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Confirmation.Specified.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Confirmation.Pending.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.island;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
import com.songoda.skyblock.config.FileManager.Config;
|
||||
@ -26,10 +26,10 @@ public class ControlPanelCommand extends SubCommand {
|
||||
|
||||
if (this.plugin.getIslandManager().getIsland(player) == null) {
|
||||
this.plugin.getMessageManager().sendMessage(player, configLoad.getString("Command.Island.ControlPanel.Owner.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else {
|
||||
ControlPanel.getInstance().open(player);
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_CHEST_OPEN.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_CHEST_OPEN);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.island;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
import com.songoda.skyblock.config.FileManager;
|
||||
@ -46,9 +46,8 @@ public class CoopCommand extends SubCommand {
|
||||
|
||||
if (island == null) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Coop.Owner.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
} else if (this.plugin.getConfiguration()
|
||||
.getBoolean("Island.Coop.Enable")) {
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else if (this.plugin.getConfiguration().getBoolean("Island.Coop.Enable")) {
|
||||
if (island.hasRole(IslandRole.OWNER, player.getUniqueId())
|
||||
|| (island.hasRole(IslandRole.OPERATOR, player.getUniqueId())
|
||||
&& permissionManager.hasPermission(island, "CoopPlayers", IslandRole.OPERATOR))) {
|
||||
@ -74,19 +73,19 @@ public class CoopCommand extends SubCommand {
|
||||
|
||||
if (targetPlayerUUID == null) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Coop.Found.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else if (targetPlayerUUID.equals(player.getUniqueId())) {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Coop.Yourself.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else if (island.hasRole(IslandRole.MEMBER, targetPlayerUUID)
|
||||
|| island.hasRole(IslandRole.OPERATOR, targetPlayerUUID)
|
||||
|| island.hasRole(IslandRole.OWNER, targetPlayerUUID)) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Coop.Member.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else if (island.getBan().isBanned(targetPlayerUUID)) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Coop.Banned.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else if (island.isCoopPlayer(targetPlayerUUID)) {
|
||||
if (targetPlayer != null) {
|
||||
if (islandManager.getVisitorsAtIsland(island).contains(targetPlayerUUID)) {
|
||||
@ -96,17 +95,15 @@ public class CoopCommand extends SubCommand {
|
||||
|
||||
messageManager.sendMessage(targetPlayer,
|
||||
configLoad.getString("Command.Island.Coop.Removed.Target.Message"));
|
||||
soundManager.playSound(targetPlayer, CompatibleSound.ENTITY_IRON_GOLEM_ATTACK.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(targetPlayer, XSound.ENTITY_IRON_GOLEM_ATTACK);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
island.removeCoopPlayer(targetPlayerUUID);
|
||||
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Coop.Removed.Sender.Message").replace("%player",
|
||||
targetPlayerName));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_IRON_GOLEM_ATTACK.getSound(), 1.0F, 1.0F);
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Coop.Removed.Sender.Message").replace("%player", targetPlayerName));
|
||||
soundManager.playSound(player, XSound.ENTITY_IRON_GOLEM_ATTACK);
|
||||
} else {
|
||||
IslandCoop type = IslandCoop.NORMAL;
|
||||
if (args.length == 2 && args[1].equalsIgnoreCase(temp)) {
|
||||
@ -123,26 +120,26 @@ public class CoopCommand extends SubCommand {
|
||||
.replace("%player", player.getName()));
|
||||
}
|
||||
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_NOTE_BLOCK_PLING.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_NOTE_BLOCK_PLING);
|
||||
}
|
||||
|
||||
return;
|
||||
} else if (args.length != 0) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Coop.Invalid.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
this.plugin.getGuiManager().showGUI(player, new GuiCoop(this.plugin, island, null));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_CHEST_OPEN.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_CHEST_OPEN);
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Coop.Permission.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Coop.Disabled.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.island;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
import com.songoda.skyblock.config.FileManager;
|
||||
@ -45,34 +45,34 @@ public class CreateCommand extends SubCommand {
|
||||
|
||||
if (structure != null && islandManager.createIsland(player, structure)) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Island.Creator.Selector.Created.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_NOTE_BLOCK_PLING.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_NOTE_BLOCK_PLING);
|
||||
} else if (structure == null) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Create.StructureNotFound.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_VILLAGER_NO);
|
||||
}
|
||||
} else if (mainConfig.getFileConfiguration().getBoolean("Island.Creation.Menu.Enable")) {
|
||||
Creator.getInstance().open(player);
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_CHEST_OPEN.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_CHEST_OPEN);
|
||||
} else {
|
||||
List<Structure> structures = this.plugin.getStructureManager().getStructures();
|
||||
|
||||
if (structures.isEmpty()) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Island.Creator.Selector.None.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
return;
|
||||
} else if (!fileManager
|
||||
.isFileExist(new File(new File(this.plugin.getDataFolder() + "/structures"), structures.get(0).getOverworldFile()))) {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Island.Creator.Selector.File.Overworld.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
return;
|
||||
} else if (!fileManager
|
||||
.isFileExist(new File(new File(this.plugin.getDataFolder() + "/structures"), structures.get(0).getNetherFile()))) {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Island.Creator.Selector.File.Nether.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
return;
|
||||
} else if (fileManager.getConfig(new File(this.plugin.getDataFolder(), "config.yml"))
|
||||
@ -97,19 +97,19 @@ public class CreateCommand extends SubCommand {
|
||||
.getString("Island.Creator.Selector.Cooldown.Word.Second")));
|
||||
}
|
||||
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_VILLAGER_NO);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (islandManager.createIsland(player, structures.get(0))) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Island.Creator.Selector.Created.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_NOTE_BLOCK_PLING.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_NOTE_BLOCK_PLING);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Create.Owner.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_VILLAGER_NO);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.island;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
import com.songoda.skyblock.config.FileManager.Config;
|
||||
@ -38,7 +38,7 @@ public class CurrentCommand extends SubCommand {
|
||||
if (targetPlayer == null) {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Current.Offline.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -65,14 +65,13 @@ public class CurrentCommand extends SubCommand {
|
||||
.replace("%owner", ownerPlayerName));
|
||||
}
|
||||
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_YES.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_VILLAGER_YES);
|
||||
|
||||
return;
|
||||
}
|
||||
} else if (args.length > 1) {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Current.Invalid.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Current.Invalid.Message"));
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -94,12 +93,10 @@ public class CurrentCommand extends SubCommand {
|
||||
targetPlayerName = targetPlayer.getName();
|
||||
}
|
||||
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Current.Island.Owner.Yourself.Message").replace("%player",
|
||||
targetPlayerName));
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Current.Island.Owner.Yourself.Message").replace("%player", targetPlayerName));
|
||||
}
|
||||
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_YES.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_VILLAGER_YES);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.island;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
import com.songoda.skyblock.config.FileManager;
|
||||
@ -52,7 +52,7 @@ public class DeleteCommand extends SubCommand {
|
||||
|
||||
if (island == null) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Delete.Owner.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_VILLAGER_NO);
|
||||
} else if (island.hasRole(IslandRole.OWNER, player.getUniqueId())) {
|
||||
if (fileManager.getConfig(new File(this.plugin.getDataFolder(), "config.yml"))
|
||||
.getFileConfiguration().getBoolean("Island.Creation.Cooldown.Creation.Enable")
|
||||
@ -76,14 +76,13 @@ public class DeleteCommand extends SubCommand {
|
||||
.getString("Island.Deletion.Cooldown.Word.Second")));
|
||||
}
|
||||
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_VILLAGER_NO);
|
||||
|
||||
return;
|
||||
}
|
||||
if (playerData.getConfirmationTime() > 0) {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Delete.Confirmation.Pending.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_IRON_GOLEM_ATTACK.getSound(), 1.0F, 1.0F);
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Delete.Confirmation.Pending.Message"));
|
||||
soundManager.playSound(player, XSound.ENTITY_IRON_GOLEM_ATTACK);
|
||||
} else {
|
||||
int confirmationTime = fileManager.getConfig(new File(this.plugin.getDataFolder(), "config.yml"))
|
||||
.getFileConfiguration().getInt("Island.Confirmation.Timeout");
|
||||
@ -154,11 +153,11 @@ public class DeleteCommand extends SubCommand {
|
||||
messageManager.sendMessage(player, confirmationMessage.replace("%time", "" + confirmationTime));
|
||||
}
|
||||
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_YES.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_VILLAGER_YES);
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Delete.Permission.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_VILLAGER_NO);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.island;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
import com.songoda.skyblock.config.FileManager.Config;
|
||||
@ -38,7 +38,7 @@ public class DemoteCommand extends SubCommand {
|
||||
|
||||
if (island == null) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Demote.Owner.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else if (island.hasRole(IslandRole.OWNER, player.getUniqueId())) {
|
||||
Player targetPlayer = Bukkit.getServer().getPlayer(args[0]);
|
||||
|
||||
@ -49,58 +49,53 @@ public class DemoteCommand extends SubCommand {
|
||||
if (offlinePlayer.getUniqueId() != null && (islandMembers.contains(offlinePlayer.getUniqueId())
|
||||
|| island.getRole(IslandRole.OPERATOR).contains(offlinePlayer.getUniqueId()))) {
|
||||
if (islandMembers.contains(offlinePlayer.getUniqueId())) {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Demote.Role.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Demote.Role.Message"));
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Demote.Demoted.Sender.Message")
|
||||
.replace("%player", offlinePlayer.getName()));
|
||||
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_IRON_GOLEM_ATTACK.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_IRON_GOLEM_ATTACK);
|
||||
|
||||
island.removeRole(IslandRole.OPERATOR, offlinePlayer.getUniqueId());
|
||||
island.setRole(IslandRole.MEMBER, offlinePlayer.getUniqueId());
|
||||
island.save();
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Demote.Member.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Demote.Member.Message"));
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
} else {
|
||||
if (island.hasRole(IslandRole.MEMBER, targetPlayer.getUniqueId())
|
||||
|| island.hasRole(IslandRole.OPERATOR, targetPlayer.getUniqueId())) {
|
||||
if (island.hasRole(IslandRole.MEMBER, targetPlayer.getUniqueId())) {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Demote.Role.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Demote.Role.Message"));
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Demote.Demoted.Sender.Message")
|
||||
.replace("%player", targetPlayer.getName()));
|
||||
messageManager.sendMessage(targetPlayer,
|
||||
configLoad.getString("Command.Island.Demote.Demoted.Target.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_IRON_GOLEM_ATTACK.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(targetPlayer, CompatibleSound.ENTITY_IRON_GOLEM_ATTACK.getSound(), 1.0F, 1.0F);
|
||||
messageManager.sendMessage(targetPlayer, configLoad.getString("Command.Island.Demote.Demoted.Target.Message"));
|
||||
soundManager.playSound(player, XSound.ENTITY_IRON_GOLEM_ATTACK);
|
||||
soundManager.playSound(targetPlayer, XSound.ENTITY_IRON_GOLEM_ATTACK);
|
||||
|
||||
island.removeRole(IslandRole.OPERATOR, targetPlayer.getUniqueId());
|
||||
island.setRole(IslandRole.MEMBER, targetPlayer.getUniqueId());
|
||||
island.save();
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Promote.Member.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Promote.Member.Message"));
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Demote.Permission.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_VILLAGER_NO);
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Demote.Invalid.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.island;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
import com.songoda.skyblock.config.FileManager.Config;
|
||||
@ -41,25 +41,25 @@ public class DenyCommand extends SubCommand {
|
||||
messageManager.sendMessage(targetPlayer,
|
||||
configLoad.getString("Command.Island.Deny.Denied.Target.Message").replace("%player",
|
||||
player.getName()));
|
||||
soundManager.playSound(targetPlayer, CompatibleSound.ENTITY_IRON_GOLEM_ATTACK.getSound(), 5.0F, 5.0F);
|
||||
soundManager.playSound(targetPlayer, XSound.ENTITY_IRON_GOLEM_ATTACK, 5, 5);
|
||||
}
|
||||
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Deny.Denied.Sender.Message")
|
||||
.replace("%player", invite.getSenderName()));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_IRON_GOLEM_ATTACK.getSound(), 5.0F, 5.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_IRON_GOLEM_ATTACK, 5, 5);
|
||||
|
||||
inviteManager.removeInvite(player.getUniqueId());
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Deny.Invited.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_VILLAGER_NO);
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Deny.Invited.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_VILLAGER_NO);
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Deny.Invalid.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.island;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
import com.songoda.skyblock.config.FileManager.Config;
|
||||
@ -50,13 +50,13 @@ public class InformationCommand extends SubCommand {
|
||||
if (islandOwnerUUID == null) {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Information.Island.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
return;
|
||||
}
|
||||
} else if (args.length != 0) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Information.Invalid.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -64,17 +64,15 @@ public class InformationCommand extends SubCommand {
|
||||
PlayerData playerData = this.plugin.getPlayerDataManager().getPlayerData(player);
|
||||
|
||||
if (playerData.isPreview()) {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Information.Previewing.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Information.Previewing.Message"));
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
return;
|
||||
}
|
||||
|
||||
if (islandOwnerUUID == null) {
|
||||
if (islandManager.getIsland(player) == null) {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Information.Owner.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Information.Owner.Message"));
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
return;
|
||||
} else {
|
||||
@ -84,7 +82,7 @@ public class InformationCommand extends SubCommand {
|
||||
|
||||
playerData.setViewer(new Information.Viewer(islandOwnerUUID, Information.Viewer.Type.CATEGORIES));
|
||||
Information.getInstance().open(player);
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_CHEST_OPEN.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_CHEST_OPEN);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.island;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.api.event.island.IslandInviteEvent;
|
||||
import com.songoda.skyblock.api.invite.IslandInvitation;
|
||||
@ -47,7 +47,7 @@ public class InviteCommand extends SubCommand {
|
||||
|
||||
if (island == null) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Invite.Owner.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_VILLAGER_NO);
|
||||
} else if (island.hasRole(IslandRole.OWNER, player.getUniqueId())
|
||||
|| (island.hasRole(IslandRole.OPERATOR, player.getUniqueId())
|
||||
&& this.plugin.getPermissionManager().hasPermission(island, "Invite", IslandRole.OPERATOR))) {
|
||||
@ -56,42 +56,42 @@ public class InviteCommand extends SubCommand {
|
||||
if ((island.getRole(IslandRole.MEMBER).size() + island.getRole(IslandRole.OPERATOR).size()
|
||||
+ 1) >= island.getMaxMembers(player)) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Invite.Capacity.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else {
|
||||
String playerName = args[0];
|
||||
|
||||
if (playerName.equalsIgnoreCase(player.getName())) {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Invite.Yourself.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else {
|
||||
Player targetPlayer = Bukkit.getServer().getPlayer(playerName);
|
||||
|
||||
if (targetPlayer == null) {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Invite.Offline.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else if (targetPlayer.getName().equalsIgnoreCase(player.getName())) {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Invite.Yourself.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else if (island.hasRole(IslandRole.MEMBER, targetPlayer.getUniqueId())
|
||||
|| island.hasRole(IslandRole.OPERATOR, targetPlayer.getUniqueId())
|
||||
|| island.hasRole(IslandRole.OWNER, targetPlayer.getUniqueId())) {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Invite.Member.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else if (this.plugin.getInviteManager().hasInvite(targetPlayer.getUniqueId())) {
|
||||
Invite invite = this.plugin.getInviteManager().getInvite(targetPlayer.getUniqueId());
|
||||
|
||||
if (invite.getOwnerUUID().equals(island.getOwnerUUID())) {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Invite.Already.Own.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Invite.Already.Other.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
} else {
|
||||
int respondTime = mainConfig.getFileConfiguration().getInt("Island.Invite.Time");
|
||||
@ -221,21 +221,20 @@ public class InviteCommand extends SubCommand {
|
||||
island.getOwnerUUID(), respondTime);
|
||||
|
||||
Bukkit.getServer().getPluginManager()
|
||||
.callEvent(new IslandInviteEvent(island.getAPIWrapper(),
|
||||
new IslandInvitation(targetPlayer, player, invite.getTime())));
|
||||
.callEvent(new IslandInviteEvent(island.getAPIWrapper(), new IslandInvitation(targetPlayer, player, invite.getTime())));
|
||||
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_NOTE_BLOCK_PLING.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(targetPlayer, CompatibleSound.BLOCK_NOTE_BLOCK_PLING.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_NOTE_BLOCK_PLING);
|
||||
soundManager.playSound(targetPlayer, XSound.BLOCK_NOTE_BLOCK_PLING);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Invite.Permission.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_VILLAGER_NO);
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Invite.Invalid.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.island;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.api.event.island.IslandKickEvent;
|
||||
import com.songoda.skyblock.api.utils.APIUtil;
|
||||
@ -40,7 +40,7 @@ public class KickAllCommand extends SubCommand {
|
||||
|
||||
if (island == null) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.KickAll.Owner.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else if (island.hasRole(IslandRole.OWNER, player.getUniqueId())
|
||||
|| (island.hasRole(IslandRole.OPERATOR, player.getUniqueId())
|
||||
&& this.plugin.getPermissionManager().hasPermission(island, "Kick", IslandRole.OPERATOR))) {
|
||||
@ -49,7 +49,7 @@ public class KickAllCommand extends SubCommand {
|
||||
|
||||
if (islandVisitors.isEmpty()) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.KickAll.Visitors.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else {
|
||||
for (UUID islandVisitorList : islandVisitors) {
|
||||
Player targetPlayer = Bukkit.getServer().getPlayer(islandVisitorList);
|
||||
@ -69,21 +69,20 @@ public class KickAllCommand extends SubCommand {
|
||||
messageManager.sendMessage(targetPlayer,
|
||||
configLoad.getString("Command.Island.KickAll.Kicked.Target.Message")
|
||||
.replace("%player", player.getName()));
|
||||
soundManager.playSound(targetPlayer, CompatibleSound.ENTITY_IRON_GOLEM_ATTACK.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(targetPlayer, XSound.ENTITY_IRON_GOLEM_ATTACK);
|
||||
}
|
||||
}
|
||||
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.KickAll.Kicked.Sender.Message").replace("%visitors", "" + islandVisitors.size()));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_IRON_GOLEM_ATTACK.getSound(), 1.0F, 1.0F);
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.KickAll.Kicked.Sender.Message").replace("%visitors", "" + islandVisitors.size()));
|
||||
soundManager.playSound(player, XSound.ENTITY_IRON_GOLEM_ATTACK);
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.KickAll.Closed.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.KickAll.Role.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_VILLAGER_NO);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.island;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.api.event.island.IslandKickEvent;
|
||||
import com.songoda.skyblock.api.utils.APIUtil;
|
||||
@ -54,7 +54,7 @@ public class KickCommand extends SubCommand {
|
||||
|
||||
if (island == null) {
|
||||
messageManager.sendMessage(player, languageConfig.getFileConfiguration().getString("Command.Island.Kick.Owner.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else if (island.hasRole(IslandRole.OWNER, player.getUniqueId())
|
||||
|| (island.hasRole(IslandRole.OPERATOR, player.getUniqueId()) && permissionManager.hasPermission(island, "Kick", IslandRole.OPERATOR))) {
|
||||
UUID targetPlayerUUID = null;
|
||||
@ -76,20 +76,20 @@ public class KickCommand extends SubCommand {
|
||||
|
||||
if (targetPlayer != null && (targetPlayer.hasPermission("fabledskyblock.bypass.kick") || targetPlayer.isOp()) && islandVisitors.contains(targetPlayer.getUniqueId())) {
|
||||
messageManager.sendMessage(player, languageConfig.getFileConfiguration().getString("Command.Island.Kick.Exempt"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else if (targetPlayerUUID.equals(player.getUniqueId())) {
|
||||
messageManager.sendMessage(player, languageConfig.getFileConfiguration().getString("Command.Island.Kick.Yourself.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else if (islandOperators.contains(player.getUniqueId()) && islandOperators.contains(targetPlayerUUID)) {
|
||||
messageManager.sendMessage(player, languageConfig.getFileConfiguration().getString("Command.Island.Kick.Role.Operator.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else if (island.getOwnerUUID().equals(targetPlayerUUID)) {
|
||||
messageManager.sendMessage(player, languageConfig.getFileConfiguration().getString("Command.Island.Kick.Role.Owner.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else if (island.getStatus() != IslandStatus.CLOSED && islandVisitors.contains(targetPlayerUUID)) {
|
||||
if (island.isCoopPlayer(targetPlayerUUID)) {
|
||||
messageManager.sendMessage(player, languageConfig.getFileConfiguration().getString("Command.Island.Kick.Cooped.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else {
|
||||
IslandKickEvent islandKickEvent = new IslandKickEvent(island.getAPIWrapper(), APIUtil.fromImplementation(IslandRole.VISITOR),
|
||||
Bukkit.getServer().getOfflinePlayer(targetPlayerUUID), player);
|
||||
@ -101,11 +101,11 @@ public class KickCommand extends SubCommand {
|
||||
|
||||
messageManager.sendMessage(player,
|
||||
languageConfig.getFileConfiguration().getString("Command.Island.Kick.Kicked.Sender.Message").replace("%player", targetPlayerName));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_IRON_GOLEM_ATTACK.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_IRON_GOLEM_ATTACK);
|
||||
|
||||
messageManager.sendMessage(targetPlayer,
|
||||
languageConfig.getFileConfiguration().getString("Command.Island.Kick.Kicked.Target.Message").replace("%player", player.getName()));
|
||||
soundManager.playSound(targetPlayer, CompatibleSound.ENTITY_IRON_GOLEM_ATTACK.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(targetPlayer, XSound.ENTITY_IRON_GOLEM_ATTACK);
|
||||
}
|
||||
}
|
||||
} else if (islandMembers.contains(targetPlayerUUID) || islandOperators.contains(targetPlayerUUID)) {
|
||||
@ -123,7 +123,7 @@ public class KickCommand extends SubCommand {
|
||||
if (!islandKickEvent.isCancelled()) {
|
||||
messageManager.sendMessage(player,
|
||||
languageConfig.getFileConfiguration().getString("Command.Island.Kick.Kicked.Sender.Message").replace("%player", targetPlayerName));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_IRON_GOLEM_ATTACK.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_IRON_GOLEM_ATTACK);
|
||||
|
||||
if (targetPlayer == null) {
|
||||
Config config = fileManager.getConfig(new File(new File(this.plugin.getDataFolder().toString() + "/player-data"), targetPlayerUUID.toString() + ".yml"));
|
||||
@ -141,7 +141,7 @@ public class KickCommand extends SubCommand {
|
||||
} else {
|
||||
messageManager.sendMessage(targetPlayer,
|
||||
languageConfig.getFileConfiguration().getString("Command.Island.Kick.Kicked.Target.Message").replace("%player", player.getName()));
|
||||
soundManager.playSound(targetPlayer, CompatibleSound.ENTITY_IRON_GOLEM_ATTACK.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(targetPlayer, XSound.ENTITY_IRON_GOLEM_ATTACK);
|
||||
|
||||
if (islandManager.isPlayerAtIsland(island, targetPlayer)
|
||||
&& !targetPlayer.hasPermission("fabledskyblock.bypass.kick")
|
||||
@ -197,7 +197,7 @@ public class KickCommand extends SubCommand {
|
||||
break;
|
||||
}
|
||||
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
} else {
|
||||
switch (island.getStatus()) {
|
||||
@ -210,11 +210,11 @@ public class KickCommand extends SubCommand {
|
||||
break;
|
||||
}
|
||||
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_VILLAGER_NO);
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(player, languageConfig.getFileConfiguration().getString("Command.Island.Kick.Invalid.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.island;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
import com.songoda.skyblock.config.FileManager;
|
||||
@ -54,24 +54,24 @@ public class LeaderboardCommand extends SubCommand {
|
||||
playerDataManager.getPlayerData(player).setViewer(new Leaderboard.Viewer(Leaderboard.Viewer.Type.VOTES));
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Leaderboard.Disabled.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Leaderboard.Invalid.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Leaderboard.Invalid.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Leaderboard.getInstance().open(player);
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_CHEST_OPEN.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_CHEST_OPEN);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.island;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.api.event.player.PlayerIslandLeaveEvent;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
@ -47,11 +47,11 @@ public class LeaveCommand extends SubCommand {
|
||||
if (island == null) {
|
||||
messageManager.sendMessage(player,
|
||||
languageConfig.getFileConfiguration().getString("Command.Island.Leave.Member.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else if (island.hasRole(IslandRole.OWNER, player.getUniqueId())) {
|
||||
messageManager.sendMessage(player,
|
||||
languageConfig.getFileConfiguration().getString("Command.Island.Leave.Owner.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else {
|
||||
PlayerIslandLeaveEvent islandLeaveEvent = new PlayerIslandLeaveEvent(player, island.getAPIWrapper());
|
||||
Bukkit.getServer().getPluginManager().callEvent(islandLeaveEvent);
|
||||
@ -105,7 +105,7 @@ public class LeaveCommand extends SubCommand {
|
||||
languageConfig.getFileConfiguration()
|
||||
.getString("Command.Island.Leave.Left.Broadcast.Message")
|
||||
.replace("%player", player.getName())));
|
||||
soundManager.playSound(loopPlayer, CompatibleSound.ENTITY_IRON_GOLEM_ATTACK.getSound(), 5.0F, 5.0F);
|
||||
soundManager.playSound(loopPlayer, XSound.ENTITY_IRON_GOLEM_ATTACK, 5, 5);
|
||||
|
||||
if (island.getRole(IslandRole.MEMBER).isEmpty() && island.getRole(IslandRole.OPERATOR).isEmpty()) {
|
||||
if (!islandManager.getVisitorsAtIsland(island).isEmpty()) {
|
||||
@ -119,7 +119,7 @@ public class LeaveCommand extends SubCommand {
|
||||
}
|
||||
|
||||
messageManager.sendMessage(player, languageConfig.getFileConfiguration().getString("Command.Island.Leave.Left.Sender.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_IRON_GOLEM_ATTACK.getSound(), 5.0F, 5.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_IRON_GOLEM_ATTACK, 5, 5);
|
||||
|
||||
scoreboardManager.updatePlayerScoreboardType(player);
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.island;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.craftaro.core.utils.NumberUtils;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
@ -63,7 +63,7 @@ public class LevelCommand extends SubCommand {
|
||||
if (islandOwnerUUID == null) {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Level.Owner.Other.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
return;
|
||||
} else if (!islandOwnerUUID.equals(playerDataManager.getPlayerData(player).getOwner())) {
|
||||
@ -73,20 +73,20 @@ public class LevelCommand extends SubCommand {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Level.Level.Message")
|
||||
.replace("%player", targetPlayerName).replace("%level", NumberUtils.formatNumber(visit.getLevel().getLevel())));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_PLAYER_LEVELUP.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_PLAYER_LEVELUP);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Level.Owner.Other.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
return;
|
||||
}
|
||||
} else if (args.length != 0) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Level.Invalid.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -95,7 +95,7 @@ public class LevelCommand extends SubCommand {
|
||||
|
||||
if (island == null) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Level.Owner.Yourself.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else {
|
||||
player.closeInventory();
|
||||
|
||||
@ -132,20 +132,20 @@ public class LevelCommand extends SubCommand {
|
||||
+ configLoad.getString("Command.Island.Level.Cooldown.Word.Second")));
|
||||
}
|
||||
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_VILLAGER_NO);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Level.Processing.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_YES.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_VILLAGER_YES);
|
||||
|
||||
cooldownManager.createPlayer(CooldownType.LEVELLING,
|
||||
Bukkit.getServer().getOfflinePlayer(island.getOwnerUUID()));
|
||||
levellingManager.startScan(player, island);
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Level.Loading.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_CHEST_OPEN.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_CHEST_OPEN);
|
||||
Levelling.getInstance().open(player);
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.island;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
import com.songoda.skyblock.menus.Members;
|
||||
@ -24,15 +24,14 @@ public class MembersCommand extends SubCommand {
|
||||
this.plugin.getMessageManager().sendMessage(player,
|
||||
this.plugin.getFileManager().getConfig(new File(this.plugin.getDataFolder(), "language.yml"))
|
||||
.getFileConfiguration().getString("Command.Island.Settings.Owner.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else {
|
||||
PlayerData playerData = this.plugin.getPlayerDataManager().getPlayerData(player);
|
||||
playerData.setType(Members.Type.DEFAULT);
|
||||
playerData.setSort(Members.Sort.DEFAULT);
|
||||
|
||||
Members.getInstance().open(player, (Members.Type) playerData.getType(),
|
||||
(Members.Sort) playerData.getSort());
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_CHEST_OPEN.getSound(), 1.0F, 1.0F);
|
||||
Members.getInstance().open(player, (Members.Type) playerData.getType(), (Members.Sort) playerData.getSort());
|
||||
soundManager.playSound(player, XSound.BLOCK_CHEST_OPEN);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.island;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
import com.songoda.skyblock.config.FileManager.Config;
|
||||
@ -36,22 +36,22 @@ public class OpenCommand extends SubCommand {
|
||||
|
||||
if (island == null) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Open.Owner.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else if (island.hasRole(IslandRole.OWNER, player.getUniqueId())
|
||||
|| (island.hasRole(IslandRole.OPERATOR, player.getUniqueId())
|
||||
&& permissionManager.hasPermission(island, "Visitor", IslandRole.OPERATOR))) {
|
||||
if (island.getStatus() == IslandStatus.OPEN) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Open.Already.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else {
|
||||
island.setStatus(IslandStatus.OPEN);
|
||||
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Open.Opened.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_WOODEN_DOOR_OPEN.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_WOODEN_DOOR_OPEN);
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Open.Permission.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_VILLAGER_NO);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.island;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
import com.songoda.skyblock.config.FileManager;
|
||||
@ -56,12 +56,12 @@ public class OwnerCommand extends SubCommand {
|
||||
|
||||
if (island == null) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Ownership.Owner.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
} else if (args.length == 0) {
|
||||
if (island.hasRole(IslandRole.OWNER, player.getUniqueId())) {
|
||||
playerData.setType(Ownership.Visibility.HIDDEN);
|
||||
Ownership.getInstance().open(player);
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_CHEST_OPEN.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_CHEST_OPEN.getSound(), 1.0F, 1.0F);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -70,7 +70,7 @@ public class OwnerCommand extends SubCommand {
|
||||
if (playerData.getConfirmationTime() > 0) {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Ownership.Confirmation.Pending.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_IRON_GOLEM_ATTACK.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_IRON_GOLEM_ATTACK.getSound(), 1.0F, 1.0F);
|
||||
} else {
|
||||
UUID targetPlayerUUID;
|
||||
String targetPlayerName;
|
||||
@ -91,11 +91,11 @@ public class OwnerCommand extends SubCommand {
|
||||
&& !island.hasRole(IslandRole.OWNER, targetPlayerUUID))) {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Ownership.Member.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
} else if (targetPlayerUUID.equals(player.getUniqueId())) {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Ownership.Yourself.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
} else if (cooldownManager.hasPlayer(CooldownType.OWNERSHIP,
|
||||
Bukkit.getServer().getOfflinePlayer(island.getOwnerUUID()))) {
|
||||
CooldownPlayer cooldownPlayer = cooldownManager.getCooldownPlayer(CooldownType.OWNERSHIP,
|
||||
@ -126,7 +126,7 @@ public class OwnerCommand extends SubCommand {
|
||||
+ configLoad.getString("Command.Island.Ownership.Cooldown.Word.Second")));
|
||||
}
|
||||
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
|
||||
return;
|
||||
} else {
|
||||
@ -203,7 +203,7 @@ public class OwnerCommand extends SubCommand {
|
||||
.replace("%time", "" + confirmationTime));
|
||||
}
|
||||
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_YES.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_VILLAGER_YES.getSound(), 1.0F, 1.0F);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@ -217,13 +217,13 @@ public class OwnerCommand extends SubCommand {
|
||||
all.sendMessage(ChatColor.translateAlternateColorCodes('&',
|
||||
configLoad.getString("Command.Island.Ownership.Assigned.Broadcast.Message")
|
||||
.replace("%player", player.getName())));
|
||||
soundManager.playSound(all, CompatibleSound.BLOCK_ANVIL_USE.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(all, XSound.BLOCK_ANVIL_USE.getSound(), 1.0F, 1.0F);
|
||||
}
|
||||
}
|
||||
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Ownership.Assigned.Sender.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_USE.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_USE.getSound(), 1.0F, 1.0F);
|
||||
|
||||
islandManager.giveOwnership(island, player);
|
||||
|
||||
@ -232,19 +232,19 @@ public class OwnerCommand extends SubCommand {
|
||||
} else {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Ownership.Password.Incorrect.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Ownership.Password.Unset.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Ownership.Invalid.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.island;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
import com.songoda.skyblock.config.FileManager;
|
||||
@ -59,7 +59,7 @@ public class PreviewCommand extends SubCommand {
|
||||
Bukkit.getScheduler().runTaskLater(this.plugin, () -> {
|
||||
if (this.plugin.getIslandManager().createIsland(player, islandStructure)) {
|
||||
this.plugin.getMessageManager().sendMessage(player, configLang.getString("Island.Creator.Selector.Created.Message"));
|
||||
this.plugin.getSoundManager().playSound(player, CompatibleSound.BLOCK_NOTE_BLOCK_PLING.getSound(), 1.0F, 1.0F);
|
||||
this.plugin.getSoundManager().playSound(player, XSound.BLOCK_NOTE_BLOCK_PLING);
|
||||
}
|
||||
}, 30L);
|
||||
}
|
||||
@ -98,7 +98,7 @@ public class PreviewCommand extends SubCommand {
|
||||
.getString("Island.Preview.Cooldown.Word.Second")));
|
||||
}
|
||||
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_VILLAGER_NO);
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.island;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
import com.songoda.skyblock.config.FileManager.Config;
|
||||
@ -36,7 +36,7 @@ public class PromoteCommand extends SubCommand {
|
||||
|
||||
if (args.length != 1) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Promote.Invalid.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -44,13 +44,13 @@ public class PromoteCommand extends SubCommand {
|
||||
|
||||
if (island == null) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Promote.Owner.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!island.hasRole(IslandRole.OWNER, player.getUniqueId())) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Promote.Permission.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_VILLAGER_NO);
|
||||
return;
|
||||
}
|
||||
Player targetPlayer = Bukkit.getServer().getPlayer(args[0]);
|
||||
@ -65,12 +65,12 @@ public class PromoteCommand extends SubCommand {
|
||||
if (islandOperators.contains(offlinePlayer.getUniqueId())) {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Promote.Operator.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Promote.Promoted.Sender.Message")
|
||||
.replace("%player", offlinePlayer.getName()));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_FIREWORK_ROCKET_BLAST.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_FIREWORK_ROCKET_BLAST);
|
||||
|
||||
for (Player all : Bukkit.getOnlinePlayers()) {
|
||||
if (!all.getUniqueId().equals(player.getUniqueId())) {
|
||||
@ -81,7 +81,7 @@ public class PromoteCommand extends SubCommand {
|
||||
configLoad
|
||||
.getString("Command.Island.Promote.Promoted.Broadcast.Message")
|
||||
.replace("%player", offlinePlayer.getName())));
|
||||
soundManager.playSound(all, CompatibleSound.ENTITY_FIREWORK_ROCKET_BLAST.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(all, XSound.ENTITY_FIREWORK_ROCKET_BLAST);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -91,7 +91,7 @@ public class PromoteCommand extends SubCommand {
|
||||
} else {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Promote.Member.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -100,16 +100,16 @@ public class PromoteCommand extends SubCommand {
|
||||
if (island.hasRole(IslandRole.OPERATOR, targetPlayer.getUniqueId())) {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Promote.Operator.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Promote.Promoted.Sender.Message")
|
||||
.replace("%player", targetPlayer.getName()));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_FIREWORK_ROCKET_BLAST.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_FIREWORK_ROCKET_BLAST);
|
||||
|
||||
messageManager.sendMessage(targetPlayer,
|
||||
configLoad.getString("Command.Island.Promote.Promoted.Target.Message"));
|
||||
soundManager.playSound(targetPlayer, CompatibleSound.ENTITY_FIREWORK_ROCKET_BLAST.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(targetPlayer, XSound.ENTITY_FIREWORK_ROCKET_BLAST);
|
||||
|
||||
for (Player all : Bukkit.getOnlinePlayers()) {
|
||||
if (!all.getUniqueId().equals(player.getUniqueId())) {
|
||||
@ -120,7 +120,7 @@ public class PromoteCommand extends SubCommand {
|
||||
configLoad
|
||||
.getString("Command.Island.Promote.Promoted.Broadcast.Message")
|
||||
.replace("%player", targetPlayer.getName())));
|
||||
soundManager.playSound(all, CompatibleSound.ENTITY_FIREWORK_ROCKET_BLAST.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(all, XSound.ENTITY_FIREWORK_ROCKET_BLAST);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -130,7 +130,7 @@ public class PromoteCommand extends SubCommand {
|
||||
} else {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Promote.Member.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.island;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
import com.songoda.skyblock.config.FileManager.Config;
|
||||
@ -34,7 +34,7 @@ public class PublicCommand extends SubCommand {
|
||||
|
||||
if (island == null) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Public.Owner.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else if (island.hasRole(IslandRole.OWNER, player.getUniqueId())
|
||||
|| (island.hasRole(IslandRole.OPERATOR, player.getUniqueId())
|
||||
&& this.plugin.getPermissionManager().hasPermission(island, "Visitor", IslandRole.OPERATOR))) {
|
||||
@ -43,24 +43,24 @@ public class PublicCommand extends SubCommand {
|
||||
islandManager.whitelistIsland(island);
|
||||
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Public.Restricted.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_WOODEN_DOOR_CLOSE.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_WOODEN_DOOR_CLOSE);
|
||||
break;
|
||||
case WHITELISTED:
|
||||
islandManager.closeIsland(island);
|
||||
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Public.Private.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_WOODEN_DOOR_CLOSE.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_WOODEN_DOOR_CLOSE);
|
||||
break;
|
||||
case CLOSED:
|
||||
island.setStatus(IslandStatus.OPEN);
|
||||
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Public.Public.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_WOODEN_DOOR_OPEN.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_WOODEN_DOOR_OPEN);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Public.Permission.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_VILLAGER_NO);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.island;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
import com.songoda.skyblock.config.FileManager.Config;
|
||||
@ -35,24 +35,24 @@ public class ScoreboardCommand extends SubCommand {
|
||||
|
||||
if (playerData == null) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Scoreboard.Error.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else if (!this.plugin.getFileManager().getConfig(new File(this.plugin.getDataFolder(), "config.yml"))
|
||||
.getFileConfiguration().getBoolean("Island.Scoreboard.Enable", false)) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Scoreboard.GlobalDisable.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else if (playerData.isScoreboard()) {
|
||||
playerData.setScoreboard(false);
|
||||
scoreboardManager.addDisabledPlayer(player);
|
||||
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Scoreboard.Disabled.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_WOODEN_DOOR_CLOSE.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_WOODEN_DOOR_CLOSE);
|
||||
} else {
|
||||
playerData.setScoreboard(true);
|
||||
scoreboardManager.removeDisabledPlayer(player);
|
||||
Bukkit.getScheduler().runTask(this.plugin, () -> scoreboardManager.updatePlayerScoreboardType(player));
|
||||
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Scoreboard.Enabled.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_WOODEN_DOOR_OPEN.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_WOODEN_DOOR_OPEN);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.songoda.skyblock.command.commands.island;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleMaterial;
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
import com.songoda.skyblock.config.FileManager;
|
||||
@ -40,7 +40,7 @@ public class SetSpawnCommand extends SubCommand {
|
||||
|
||||
if (island == null) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.SetSpawn.Owner.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else {
|
||||
if (args[0].equalsIgnoreCase("Main")) {
|
||||
setIslandSpawn(IslandEnvironment.MAIN, island, islandManager, player, configLoad, fileManager, messageManager, soundManager);
|
||||
@ -51,12 +51,12 @@ public class SetSpawnCommand extends SubCommand {
|
||||
setIslandSpawn(IslandEnvironment.VISITOR, island, islandManager, player, configLoad, fileManager, messageManager, soundManager);
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.SetSpawn.Spawn.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.SetSpawn.Invalid.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
}
|
||||
|
||||
@ -109,20 +109,20 @@ public class SetSpawnCommand extends SubCommand {
|
||||
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.SetSpawn.Protection.Block.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
return;
|
||||
} else if (!player.getLocation().clone().subtract(0, 0.1, 0).getBlock().getType().isSolid()) {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.SetSpawn.Protection.Ground.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
return;
|
||||
} else if (location.getBlock().isLiquid()
|
||||
|| location.clone().add(0.0D, 1.0D, 0.0D).getBlock().isLiquid()) {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.SetSpawn.Protection.Liquid.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
return;
|
||||
} else if (CompatibleMaterial.getMaterial(location.getBlock().getType()) == CompatibleMaterial.NETHER_PORTAL
|
||||
@ -130,7 +130,7 @@ public class SetSpawnCommand extends SubCommand {
|
||||
.getType()) == CompatibleMaterial.NETHER_PORTAL) {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.SetSpawn.Protection.Portal.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
return;
|
||||
} else {
|
||||
@ -153,23 +153,23 @@ public class SetSpawnCommand extends SubCommand {
|
||||
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.SetSpawn.Set.Message").replace("%spawn", environment.name().toLowerCase()));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_NOTE_BLOCK_PLING.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_NOTE_BLOCK_PLING);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.SetSpawn.Island.Message").replace("%spawn", environment.name().toLowerCase()));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.SetSpawn.Permission.Message").replace("%spawn", environment.name().toLowerCase()));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_VILLAGER_NO);
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.SetSpawn.Role.Message")
|
||||
.replace("%spawn", environment.name().toLowerCase()));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.island;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
import com.songoda.skyblock.config.FileManager.Config;
|
||||
@ -36,7 +36,7 @@ public class SettingsCommand extends SubCommand {
|
||||
|
||||
if (island == null) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Settings.Owner.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else if (island.hasRole(IslandRole.OPERATOR, player.getUniqueId())
|
||||
|| island.hasRole(IslandRole.OWNER, player.getUniqueId())) {
|
||||
if ((island.hasRole(IslandRole.OPERATOR, player.getUniqueId())
|
||||
@ -44,15 +44,15 @@ public class SettingsCommand extends SubCommand {
|
||||
|| permissionManager.hasPermission(island, "Member", IslandRole.OPERATOR)))
|
||||
|| island.hasRole(IslandRole.OWNER, player.getUniqueId())) {
|
||||
this.plugin.getGuiManager().showGUI(player, new GuiPermissionsSelector(this.plugin, player, island, null));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_CHEST_OPEN.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_CHEST_OPEN);
|
||||
} else {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Settings.Permission.Default.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_VILLAGER_NO);
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Settings.Role.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.island;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
import com.songoda.skyblock.config.FileManager.Config;
|
||||
@ -47,7 +47,7 @@ public class TeleportCommand extends SubCommand {
|
||||
Island island = islandManager.getIsland(offlinePlayer);
|
||||
if (island == null) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Teleport.Island.None.Message", "Command.Island.Teleport.Island.None.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
if (this.plugin.getIslandManager().getIsland(player) == null) {
|
||||
String commandToExecute = configLoad.getString("Command.IslandTeleport.Aliases.NoIsland", "");
|
||||
@ -61,7 +61,7 @@ public class TeleportCommand extends SubCommand {
|
||||
UUID islandOwnerUUID = island.getOwnerUUID();
|
||||
if (islandOwnerUUID == null) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Teleport.Island.None.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
return;
|
||||
} else if (!islandOwnerUUID.equals(playerDataManager.getPlayerData(player).getOwner())) {
|
||||
@ -96,25 +96,25 @@ public class TeleportCommand extends SubCommand {
|
||||
islandManager.visitIsland(player, islandManager.getIsland(Bukkit.getServer().getOfflinePlayer(islandOwnerUUID)));
|
||||
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Teleport.Teleported.Other.Message").replace("%player", args[0]));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_ENDERMAN_TELEPORT.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_ENDERMAN_TELEPORT);
|
||||
|
||||
return;
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Teleport.Island.Closed.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Teleport.Island.None.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
return;
|
||||
}
|
||||
} else if (args.length != 0) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Teleport.Invalid.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -123,10 +123,10 @@ public class TeleportCommand extends SubCommand {
|
||||
|
||||
if (island == null) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Teleport.Owner.Message", "Command.Island.Teleport.Owner.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Teleport.Teleported.Yourself.Message", "Command.Island.Teleport.Teleported.Yourself.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_ENDERMAN_TELEPORT.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_ENDERMAN_TELEPORT);
|
||||
Bukkit.getServer().getScheduler().runTask(this.plugin, () -> {
|
||||
Location loc = island.getLocation(IslandWorld.NORMAL, IslandEnvironment.MAIN);
|
||||
PaperLib.getChunkAtAsync(loc).thenRun((() -> {
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.island;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.ban.Ban;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
@ -40,7 +40,7 @@ public class UnbanCommand extends SubCommand {
|
||||
|
||||
if (island == null) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Unban.Owner.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else if (this.plugin.getConfiguration()
|
||||
.getBoolean("Island.Visitor.Banning")) {
|
||||
if (island.hasRole(IslandRole.OWNER, player.getUniqueId())
|
||||
@ -62,23 +62,23 @@ public class UnbanCommand extends SubCommand {
|
||||
|
||||
if (targetPlayerUUID == null) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Unban.Found.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else if (targetPlayerUUID.equals(player.getUniqueId())) {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Unban.Yourself.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else if (island.hasRole(IslandRole.MEMBER, targetPlayerUUID)
|
||||
|| island.hasRole(IslandRole.OPERATOR, targetPlayerUUID)
|
||||
|| island.hasRole(IslandRole.OWNER, targetPlayerUUID)) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Unban.Member.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else if (!island.getBan().isBanned(targetPlayerUUID)) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Unban.Banned.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Unban.Unbanned.Message")
|
||||
.replace("%player", targetPlayerName));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_IRON_GOLEM_ATTACK.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_IRON_GOLEM_ATTACK);
|
||||
|
||||
Ban ban = island.getBan();
|
||||
ban.removeBan(targetPlayerUUID);
|
||||
@ -86,15 +86,15 @@ public class UnbanCommand extends SubCommand {
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Unban.Permission.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_VILLAGER_NO);
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Unban.Disabled.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Unban.Invalid.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.songoda.skyblock.command.commands.island;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.hooks.economies.Economy;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.craftaro.core.utils.NumberUtils;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
@ -37,7 +37,7 @@ public class UnlockCommand extends SubCommand {
|
||||
|
||||
if (args.length != 1) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Unlock.Invalid.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -45,13 +45,13 @@ public class UnlockCommand extends SubCommand {
|
||||
|
||||
if (!type.equals("Nether") && !type.equals("End")) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Unlock.Invalid.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!this.plugin.getConfiguration().getBoolean("Island.World." + type + ".Enable")) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Unlock.Disabled.Message").replace("%type%", type));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -60,13 +60,13 @@ public class UnlockCommand extends SubCommand {
|
||||
|
||||
if (island == null) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Unlock.Owner.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
return;
|
||||
}
|
||||
|
||||
if (islandManager.isIslandWorldUnlocked(island, islandWorld)) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Unlock.Unlocked.Message").replace("%type%", type));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -76,11 +76,11 @@ public class UnlockCommand extends SubCommand {
|
||||
if (!economy.hasBalance(player, price)) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Unlock.Money.Message").replace(
|
||||
"%cost%", NumberUtils.formatNumber(price)));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
return;
|
||||
}
|
||||
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_PLAYER_LEVELUP.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_PLAYER_LEVELUP);
|
||||
economy.withdrawBalance(player, price);
|
||||
|
||||
islandManager.unlockIslandWorld(island, islandWorld);
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.songoda.skyblock.command.commands.island;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.hooks.economies.Economy;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
import com.songoda.skyblock.config.FileManager.Config;
|
||||
@ -31,16 +31,16 @@ public class UpgradeCommand extends SubCommand {
|
||||
if (this.plugin.getIslandManager().getIsland(player) == null) {
|
||||
this.plugin.getMessageManager().sendMessage(player,
|
||||
configLoad.getString("Command.Island.Upgrade.Owner.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else {
|
||||
if (economy == null || !economy.isEnabled()) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Upgrade.Disabled.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
return;
|
||||
}
|
||||
|
||||
Upgrade.getInstance().open(player);
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_CHEST_OPEN.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_CHEST_OPEN);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.songoda.skyblock.command.commands.island;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleMaterial;
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.craftaro.core.utils.NumberUtils;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
@ -35,7 +35,7 @@ public class ValueCommand extends SubCommand {
|
||||
|
||||
if (player.getItemInHand() == null) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Value.Hand.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else {
|
||||
CompatibleMaterial materials = CompatibleMaterial.getMaterial(player.getItemInHand().getType().name());
|
||||
|
||||
@ -46,10 +46,10 @@ public class ValueCommand extends SubCommand {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Value.Value.Message").replace("%material", WordUtils.capitalizeFully(materials.name().toLowerCase().replace("_", " ")))
|
||||
.replace("%points", "" + worth).replace("%level", NumberUtils.formatNumber(level)));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_YES.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_VILLAGER_YES);
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Value.None.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.island;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
import com.songoda.skyblock.menus.Visit;
|
||||
@ -32,14 +32,14 @@ public class VisitCommand extends SubCommand {
|
||||
playerData.setSort(Visit.Sort.DEFAULT);
|
||||
|
||||
Visit.getInstance().open(player, (Visit.Type) playerData.getType(), (Visit.Sort) playerData.getSort());
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_CHEST_OPEN.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_CHEST_OPEN);
|
||||
} else if (args.length == 1) {
|
||||
Bukkit.getServer().getScheduler().runTask(this.plugin, () -> Bukkit.getServer().dispatchCommand(player, "island teleport " + args[0]));
|
||||
} else {
|
||||
messageManager.sendMessage(player,
|
||||
this.plugin.getFileManager().getConfig(new File(this.plugin.getDataFolder(), "language.yml"))
|
||||
.getFileConfiguration().getString("Command.Island.Visit.Invalid.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.island;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
import com.songoda.skyblock.config.FileManager.Config;
|
||||
@ -33,13 +33,13 @@ public class VisitorsCommand extends SubCommand {
|
||||
|
||||
if (island == null) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Visitors.Owner.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else if (islandManager.getVisitorsAtIsland(island).isEmpty()) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Visitors.Visitors.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else {
|
||||
Visitors.getInstance().open(player);
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_CHEST_OPEN.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_CHEST_OPEN);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.island;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.api.event.player.PlayerVoteEvent;
|
||||
import com.songoda.skyblock.api.event.player.PlayerVoteRemoveEvent;
|
||||
@ -47,7 +47,7 @@ public class VoteCommand extends SubCommand {
|
||||
if (!this.plugin.getConfiguration()
|
||||
.getBoolean("Island.Visitor.Vote")) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Vote.Disabled.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -67,10 +67,10 @@ public class VoteCommand extends SubCommand {
|
||||
|
||||
if (islandOwnerUUID == null) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Vote.Island.None.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else if (!visitManager.hasIsland(islandOwnerUUID)) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Vote.Island.Unloaded.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else {
|
||||
Visit visit = visitManager.getIsland(islandOwnerUUID);
|
||||
if (!islandManager.containsIsland(islandOwnerUUID)) {
|
||||
@ -86,7 +86,7 @@ public class VoteCommand extends SubCommand {
|
||||
|| island.hasRole(IslandRole.OWNER, player.getUniqueId())) {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Vote.Island.Member.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else if (playerDataManager.hasPlayerData(player)) {
|
||||
PlayerData playerData = playerDataManager.getPlayerData(player);
|
||||
|
||||
@ -98,7 +98,7 @@ public class VoteCommand extends SubCommand {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Vote.Vote.Removed.Message")
|
||||
.replace("%player", targetPlayerName));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_GENERIC_EXPLODE.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_GENERIC_EXPLODE);
|
||||
} else {
|
||||
PlayerVoteEvent playerVoteEvent = new PlayerVoteEvent(player, island.getAPIWrapper());
|
||||
Bukkit.getServer().getPluginManager().callEvent(playerVoteEvent);
|
||||
@ -111,12 +111,12 @@ public class VoteCommand extends SubCommand {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Vote.Vote.Added.Message")
|
||||
.replace("%player", targetPlayerName));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_PLAYER_LEVELUP.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_PLAYER_LEVELUP);
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Vote.Island.Location.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
|
||||
islandManager.unloadIsland(island, null);
|
||||
@ -124,12 +124,12 @@ public class VoteCommand extends SubCommand {
|
||||
} else {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Vote.Island.Closed.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Vote.Invalid.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.island;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
import com.songoda.skyblock.island.Island;
|
||||
@ -33,15 +33,15 @@ public class WeatherCommand extends SubCommand {
|
||||
|
||||
if (island == null) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Weather.Owner.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else if ((island.hasRole(IslandRole.OPERATOR, player.getUniqueId())
|
||||
&& this.plugin.getPermissionManager().hasPermission(island, "Weather", IslandRole.OPERATOR))
|
||||
|| island.hasRole(IslandRole.OWNER, player.getUniqueId())) {
|
||||
Weather.getInstance().open(player);
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_CHEST_OPEN.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_CHEST_OPEN);
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Weather.Permission.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_VILLAGER_NO);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.island;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
import com.songoda.skyblock.config.FileManager;
|
||||
@ -40,7 +40,7 @@ public class WhitelistCommand extends SubCommand {
|
||||
|
||||
if (island == null) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Whitelist.Owner.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else if (island.hasRole(IslandRole.OWNER, player.getUniqueId())
|
||||
|| (island.hasRole(IslandRole.OPERATOR, player.getUniqueId())
|
||||
&& this.plugin.getPermissionManager().hasPermission(island, "Visitor", IslandRole.OPERATOR))) {
|
||||
@ -99,7 +99,7 @@ public class WhitelistCommand extends SubCommand {
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Whitelist.Permission.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_VILLAGER_NO);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.command.commands.island.disabled;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.command.SubCommand;
|
||||
import com.songoda.skyblock.config.FileManager;
|
||||
@ -44,12 +44,12 @@ public class ResetCommand extends SubCommand {
|
||||
|
||||
if (island == null) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Reset.Owner.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_VILLAGER_NO);
|
||||
} else if (island.hasRole(IslandRole.OWNER, player.getUniqueId())) {
|
||||
if (playerData.getConfirmationTime() > 0) {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Reset.Confirmation.Pending.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_IRON_GOLEM_ATTACK.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_IRON_GOLEM_ATTACK);
|
||||
} else {
|
||||
int confirmationTime = fileManager.getConfig(new File(this.plugin.getDataFolder(), "config.yml"))
|
||||
.getFileConfiguration().getInt("Island.Confirmation.Timeout");
|
||||
@ -69,11 +69,11 @@ public class ResetCommand extends SubCommand {
|
||||
ChatColor.translateAlternateColorCodes('&', configLoad.getString(
|
||||
"Command.Island.Reset.Confirmation.Confirm.Word.Tutorial")))
|
||||
.create()))));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_YES.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_VILLAGER_YES);
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Reset.Permission.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_VILLAGER_NO);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
package com.songoda.skyblock.generator;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleMaterial;
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.compatibility.ServerVersion;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.island.IslandWorld;
|
||||
import org.bukkit.block.Block;
|
||||
@ -125,7 +125,7 @@ public class GeneratorManager {
|
||||
return block.getState();
|
||||
}
|
||||
|
||||
this.plugin.getSoundManager().playSound(block.getLocation(), CompatibleSound.BLOCK_FIRE_EXTINGUISH.getSound(), 1.0F, 10.0F);
|
||||
this.plugin.getSoundManager().playSound(block.getLocation(), XSound.BLOCK_FIRE_EXTINGUISH, 1, 10);
|
||||
|
||||
|
||||
if (ServerVersion.isServerVersionAbove(ServerVersion.V1_12)) {
|
||||
|
@ -1,10 +1,10 @@
|
||||
package com.songoda.skyblock.gui;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleMaterial;
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.gui.AnvilGui;
|
||||
import com.craftaro.core.gui.Gui;
|
||||
import com.craftaro.core.gui.GuiUtils;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.craftaro.core.utils.TextUtils;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.config.FileManager;
|
||||
@ -69,11 +69,11 @@ public class GuiSignatureEditor extends Gui {
|
||||
"Island.Visitor.Signature.Lines")
|
||||
|| gui.getInputText().length() > this.mainConfig.getFileConfiguration()
|
||||
.getInt("Island.Visitor.Signature.Length")) {
|
||||
this.plugin.getSoundManager().playSound(e.player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1f, 1f);
|
||||
this.plugin.getSoundManager().playSound(e.player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else {
|
||||
signatureMessage.add(gui.getInputText().trim());
|
||||
this.island.setMessage(IslandMessage.SIGNATURE, e.player.getName(), signatureMessage);
|
||||
this.plugin.getSoundManager().playSound(e.player, CompatibleSound.BLOCK_NOTE_BLOCK_PLING.getSound(), 1f, 1f);
|
||||
this.plugin.getSoundManager().playSound(e.player, XSound.BLOCK_NOTE_BLOCK_PLING);
|
||||
}
|
||||
e.player.closeInventory();
|
||||
paint();
|
||||
@ -105,30 +105,18 @@ public class GuiSignatureEditor extends Gui {
|
||||
Island island1 = this.islandManager.getIsland(player);
|
||||
|
||||
if (island1 == null) {
|
||||
this.messageManager.sendMessage(player,
|
||||
this.configLoad.getString(
|
||||
"Command.Island.Settings.Owner.Message"));
|
||||
this.plugin.getSoundManager().playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1f, 1f);
|
||||
this.messageManager.sendMessage(player, this.configLoad.getString("Command.Island.Settings.Owner.Message"));
|
||||
this.plugin.getSoundManager().playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
player.closeInventory();
|
||||
return false;
|
||||
} else if (!(island1.hasRole(IslandRole.OPERATOR,
|
||||
player.getUniqueId())
|
||||
|| island1.hasRole(IslandRole.OWNER,
|
||||
player.getUniqueId()))) {
|
||||
this.messageManager.sendMessage(player, this.configLoad
|
||||
.getString("Command.Island.Role.Message"));
|
||||
this.plugin.getSoundManager().playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1f, 1f);
|
||||
} else if (!(island1.hasRole(IslandRole.OPERATOR, player.getUniqueId()) || island1.hasRole(IslandRole.OWNER, player.getUniqueId()))) {
|
||||
this.messageManager.sendMessage(player, this.configLoad.getString("Command.Island.Role.Message"));
|
||||
this.plugin.getSoundManager().playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
player.closeInventory();
|
||||
return false;
|
||||
} else if (!this.plugin.getFileManager()
|
||||
.getConfig(new File(this.plugin.getDataFolder(),
|
||||
"config.yml"))
|
||||
.getFileConfiguration().getBoolean(
|
||||
"Island.Visitor.Signature.Enable")) {
|
||||
this.messageManager.sendMessage(player,
|
||||
this.configLoad.getString(
|
||||
"Island.Settings.Visitor.Signature.Disabled.Message"));
|
||||
this.plugin.getSoundManager().playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1f, 1f);
|
||||
} else if (!this.plugin.getFileManager().getConfig(new File(this.plugin.getDataFolder(), "config.yml")).getFileConfiguration().getBoolean("Island.Visitor.Signature.Enable")) {
|
||||
this.messageManager.sendMessage(player, this.configLoad.getString("Island.Settings.Visitor.Signature.Disabled.Message"));
|
||||
this.plugin.getSoundManager().playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
@ -1,10 +1,10 @@
|
||||
package com.songoda.skyblock.gui;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleMaterial;
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.gui.AnvilGui;
|
||||
import com.craftaro.core.gui.Gui;
|
||||
import com.craftaro.core.gui.GuiUtils;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.craftaro.core.utils.TextUtils;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.config.FileManager;
|
||||
@ -69,11 +69,11 @@ public class GuiWelcomeEditor extends Gui {
|
||||
"Island.Visitor.Welcome.Lines")
|
||||
|| gui.getInputText().length() > this.mainConfig.getFileConfiguration()
|
||||
.getInt("Island.Visitor.Welcome.Length")) {
|
||||
this.plugin.getSoundManager().playSound(e.player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1f, 1f);
|
||||
this.plugin.getSoundManager().playSound(e.player, XSound.BLOCK_ANVIL_LAND);
|
||||
} else {
|
||||
welcomeMessage.add(gui.getInputText().trim());
|
||||
this.island.setMessage(IslandMessage.WELCOME, e.player.getName(), welcomeMessage);
|
||||
this.plugin.getSoundManager().playSound(e.player, CompatibleSound.BLOCK_NOTE_BLOCK_PLING.getSound(), 1f, 1f);
|
||||
this.plugin.getSoundManager().playSound(e.player, XSound.BLOCK_NOTE_BLOCK_PLING);
|
||||
}
|
||||
e.player.closeInventory();
|
||||
paint();
|
||||
@ -108,7 +108,7 @@ public class GuiWelcomeEditor extends Gui {
|
||||
this.messageManager.sendMessage(player,
|
||||
this.configLoad.getString(
|
||||
"Command.Island.Settings.Owner.Message"));
|
||||
this.plugin.getSoundManager().playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1f, 1f);
|
||||
this.plugin.getSoundManager().playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
player.closeInventory();
|
||||
return false;
|
||||
} else if (!(island1.hasRole(IslandRole.OPERATOR,
|
||||
@ -117,7 +117,7 @@ public class GuiWelcomeEditor extends Gui {
|
||||
player.getUniqueId()))) {
|
||||
this.messageManager.sendMessage(player, this.configLoad
|
||||
.getString("Command.Island.Role.Message"));
|
||||
this.plugin.getSoundManager().playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1f, 1f);
|
||||
this.plugin.getSoundManager().playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
player.closeInventory();
|
||||
return false;
|
||||
} else if (!this.plugin.getFileManager()
|
||||
@ -128,7 +128,7 @@ public class GuiWelcomeEditor extends Gui {
|
||||
this.messageManager.sendMessage(player,
|
||||
this.configLoad.getString(
|
||||
"Island.Settings.Visitor.Welcome.Disabled.Message"));
|
||||
this.plugin.getSoundManager().playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1f, 1f);
|
||||
this.plugin.getSoundManager().playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
@ -1,10 +1,10 @@
|
||||
package com.songoda.skyblock.gui.bank;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleMaterial;
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.gui.Gui;
|
||||
import com.craftaro.core.gui.GuiManager;
|
||||
import com.craftaro.core.gui.GuiUtils;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.craftaro.core.utils.TextUtils;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.island.Island;
|
||||
@ -54,13 +54,13 @@ public class GuiBank extends Gui {
|
||||
|
||||
setButton(0, GuiUtils.createButtonItem(CompatibleMaterial.OAK_FENCE_GATE, // Exit
|
||||
TextUtils.formatText(this.languageLoad.getString("Menu.Bank.Item.Exit.Displayname"))), (event) -> {
|
||||
this.soundManager.playSound(event.player, CompatibleSound.BLOCK_CHEST_CLOSE.getSound(), 1f, 1f);
|
||||
this.soundManager.playSound(event.player, XSound.BLOCK_CHEST_CLOSE);
|
||||
event.player.closeInventory();
|
||||
});
|
||||
|
||||
setButton(8, GuiUtils.createButtonItem(CompatibleMaterial.OAK_FENCE_GATE, // Exit
|
||||
TextUtils.formatText(this.languageLoad.getString("Menu.Bank.Item.Exit.Displayname"))), (event) -> {
|
||||
this.soundManager.playSound(event.player, CompatibleSound.BLOCK_CHEST_CLOSE.getSound(), 1f, 1f);
|
||||
this.soundManager.playSound(event.player, XSound.BLOCK_CHEST_CLOSE);
|
||||
event.player.closeInventory();
|
||||
});
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
package com.songoda.skyblock.gui.bank;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleMaterial;
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.gui.AnvilGui;
|
||||
import com.craftaro.core.gui.Gui;
|
||||
import com.craftaro.core.gui.GuiUtils;
|
||||
import com.craftaro.core.hooks.economies.Economy;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.craftaro.core.utils.NumberUtils;
|
||||
import com.craftaro.core.utils.TextUtils;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
@ -58,13 +58,13 @@ public class GuiBankSelector extends Gui {
|
||||
|
||||
setButton(0, GuiUtils.createButtonItem(CompatibleMaterial.OAK_FENCE_GATE, // Exit
|
||||
TextUtils.formatText(this.languageLoad.getString("Menu.Input.Item.Exit.Displayname"))), (event) -> {
|
||||
this.soundManager.playSound(event.player, CompatibleSound.BLOCK_CHEST_CLOSE.getSound(), 1f, 1f);
|
||||
this.soundManager.playSound(event.player, XSound.BLOCK_CHEST_CLOSE);
|
||||
event.player.closeInventory();
|
||||
});
|
||||
|
||||
setButton(8, GuiUtils.createButtonItem(CompatibleMaterial.OAK_FENCE_GATE, // Exit
|
||||
TextUtils.formatText(this.languageLoad.getString("Menu.Input.Item.Exit.Displayname"))), (event) -> {
|
||||
this.soundManager.playSound(event.player, CompatibleSound.BLOCK_CHEST_CLOSE.getSound(), 1f, 1f);
|
||||
this.soundManager.playSound(event.player, XSound.BLOCK_CHEST_CLOSE);
|
||||
event.player.closeInventory();
|
||||
});
|
||||
|
||||
@ -111,18 +111,18 @@ public class GuiBankSelector extends Gui {
|
||||
switch (response) {
|
||||
case NOT_ENOUGH_MONEY:
|
||||
messageManager.sendMessage(event.player, this.languageLoad.getString("Command.Island.Bank.Short2.Message"));
|
||||
this.soundManager.playSound(event.player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1f, 1f);
|
||||
this.soundManager.playSound(event.player, XSound.BLOCK_ANVIL_LAND);
|
||||
break;
|
||||
case DECIMALS_NOT_ALLOWED:
|
||||
messageManager.sendMessage(event.player, this.languageLoad.getString("Command.Island.Bank.Short6.Message"));
|
||||
this.soundManager.playSound(event.player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1f, 1f);
|
||||
this.soundManager.playSound(event.player, XSound.BLOCK_ANVIL_LAND);
|
||||
break;
|
||||
case NEGATIVE_AMOUNT:
|
||||
messageManager.sendMessage(event.player, this.languageLoad.getString("Command.Island.Bank.Short5.Message"));
|
||||
this.soundManager.playSound(event.player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1f, 1f);
|
||||
this.soundManager.playSound(event.player, XSound.BLOCK_ANVIL_LAND);
|
||||
break;
|
||||
case SUCCESS:
|
||||
this.soundManager.playSound(event.player, CompatibleSound.ENTITY_EXPERIENCE_ORB_PICKUP.getSound(), 1f, 1f);
|
||||
this.soundManager.playSound(event.player, XSound.ENTITY_EXPERIENCE_ORB_PICKUP);
|
||||
messageManager.sendMessage(event.player, Objects.requireNonNull(this.languageLoad.getString("Command.Island.Bank." + finalAction + ".Message")).replace(
|
||||
"%amount%", NumberUtils.formatNumber(amount)));
|
||||
|
||||
@ -148,7 +148,7 @@ public class GuiBankSelector extends Gui {
|
||||
}
|
||||
} catch (NumberFormatException e1) {
|
||||
messageManager.sendMessage(e.player, this.languageLoad.getString("Command.Island.Bank.Short4.Message"));
|
||||
this.soundManager.playSound(event.player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1f, 1f);
|
||||
this.soundManager.playSound(event.player, XSound.BLOCK_ANVIL_LAND);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -168,18 +168,18 @@ public class GuiBankSelector extends Gui {
|
||||
switch (response) {
|
||||
case NOT_ENOUGH_MONEY:
|
||||
messageManager.sendMessage(e.player, this.languageLoad.getString("Command.Island.Bank.Short2.Message"));
|
||||
this.soundManager.playSound(event.player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1f, 1f);
|
||||
this.soundManager.playSound(event.player, XSound.BLOCK_ANVIL_LAND);
|
||||
break;
|
||||
case DECIMALS_NOT_ALLOWED:
|
||||
messageManager.sendMessage(e.player, this.languageLoad.getString("Command.Island.Bank.Short6.Message"));
|
||||
this.soundManager.playSound(event.player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1f, 1f);
|
||||
this.soundManager.playSound(event.player, XSound.BLOCK_ANVIL_LAND);
|
||||
break;
|
||||
case NEGATIVE_AMOUNT:
|
||||
messageManager.sendMessage(e.player, this.languageLoad.getString("Command.Island.Bank.Short5.Message"));
|
||||
this.soundManager.playSound(event.player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1f, 1f);
|
||||
this.soundManager.playSound(event.player, XSound.BLOCK_ANVIL_LAND);
|
||||
break;
|
||||
case SUCCESS:
|
||||
this.soundManager.playSound(event.player, CompatibleSound.ENTITY_EXPERIENCE_ORB_PICKUP.getSound(), 1f, 1f);
|
||||
this.soundManager.playSound(event.player, XSound.ENTITY_EXPERIENCE_ORB_PICKUP);
|
||||
messageManager.sendMessage(e.player, Objects.requireNonNull(this.languageLoad.getString("Command.Island.Bank." + finalAction + ".Message")).replace(
|
||||
"%amount%", NumberUtils.formatNumber(amount)));
|
||||
break;
|
||||
|
@ -1,9 +1,9 @@
|
||||
package com.songoda.skyblock.gui.bank;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleMaterial;
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.gui.Gui;
|
||||
import com.craftaro.core.gui.GuiUtils;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.craftaro.core.utils.TextUtils;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.bank.BankManager;
|
||||
@ -57,13 +57,13 @@ public class GuiBankTransaction extends Gui {
|
||||
|
||||
setButton(0, GuiUtils.createButtonItem(CompatibleMaterial.OAK_FENCE_GATE, // Exit
|
||||
TextUtils.formatText(this.languageLoad.getString("Menu.Bank.Item.Exit.Displayname"))), (event) -> {
|
||||
this.soundManager.playSound(event.player, CompatibleSound.BLOCK_CHEST_CLOSE.getSound(), 1f, 1f);
|
||||
this.soundManager.playSound(event.player, XSound.BLOCK_CHEST_CLOSE);
|
||||
this.guiManager.showGUI(event.player, this.returnGui);
|
||||
});
|
||||
|
||||
setButton(8, GuiUtils.createButtonItem(CompatibleMaterial.OAK_FENCE_GATE, // Exit
|
||||
TextUtils.formatText(this.languageLoad.getString("Menu.Bank.Item.Exit.Displayname"))), (event) -> {
|
||||
this.soundManager.playSound(event.player, CompatibleSound.BLOCK_CHEST_CLOSE.getSound(), 1f, 1f);
|
||||
this.soundManager.playSound(event.player, XSound.BLOCK_CHEST_CLOSE);
|
||||
this.guiManager.showGUI(event.player, this.returnGui);
|
||||
});
|
||||
|
||||
|
@ -2,9 +2,9 @@ package com.songoda.skyblock.gui.biome;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleBiome;
|
||||
import com.craftaro.core.compatibility.CompatibleMaterial;
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.gui.Gui;
|
||||
import com.craftaro.core.gui.GuiUtils;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.craftaro.core.utils.TextUtils;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.biome.BiomeManager;
|
||||
@ -65,13 +65,13 @@ public class GuiBiome extends Gui {
|
||||
|
||||
setButton(0, GuiUtils.createButtonItem(CompatibleMaterial.OAK_FENCE_GATE, // Exit
|
||||
TextUtils.formatText(this.languageLoad.getString("Menu.Biome.Item.Exit.Displayname"))), (event) -> {
|
||||
soundManager.playSound(event.player, CompatibleSound.BLOCK_CHEST_CLOSE.getSound(), 1f, 1f);
|
||||
soundManager.playSound(event.player, XSound.BLOCK_CHEST_CLOSE);
|
||||
event.player.closeInventory();
|
||||
});
|
||||
|
||||
setButton(8, GuiUtils.createButtonItem(CompatibleMaterial.OAK_FENCE_GATE, // Exit
|
||||
TextUtils.formatText(this.languageLoad.getString("Menu.Biome.Item.Exit.Displayname"))), (event) -> {
|
||||
soundManager.playSound(event.player, CompatibleSound.BLOCK_CHEST_CLOSE.getSound(), 1f, 1f);
|
||||
soundManager.playSound(event.player, XSound.BLOCK_CHEST_CLOSE);
|
||||
event.player.closeInventory();
|
||||
});
|
||||
|
||||
@ -176,7 +176,7 @@ public class GuiBiome extends Gui {
|
||||
+ this.languageLoad.getString("Island.Biome.Cooldown.Word.Second")));
|
||||
}
|
||||
|
||||
soundManager.playSound(this.player, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(this.player, XSound.ENTITY_VILLAGER_NO);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -185,18 +185,17 @@ public class GuiBiome extends Gui {
|
||||
biomeManager.setBiome(this.island, IslandWorld.NORMAL, icon.biome, () -> {
|
||||
if (this.languageLoad.getBoolean("Command.Island.Biome.Completed.Should-Display-Message")) {
|
||||
messageManager.sendMessage(this.player, this.languageLoad.getString("Command.Island.Biome.Completed.Message"));
|
||||
soundManager.playSound(this.player, CompatibleSound.ENTITY_VILLAGER_YES.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(this.player, XSound.ENTITY_VILLAGER_YES);
|
||||
}
|
||||
});
|
||||
this.island.setBiome(icon.biome.getBiome()); // FIXME: A event is fired with has a setBiome method...
|
||||
this.island.save();
|
||||
});
|
||||
|
||||
soundManager.playSound(this.island.getLocation(IslandWorld.NORMAL, IslandEnvironment.ISLAND),
|
||||
CompatibleSound.ENTITY_GENERIC_SPLASH.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(this.island.getLocation(IslandWorld.NORMAL, IslandEnvironment.ISLAND), XSound.ENTITY_GENERIC_SPLASH, 1, 1);
|
||||
|
||||
if (!islandManager.isPlayerAtIsland(this.island, this.player, IslandWorld.NORMAL)) {
|
||||
soundManager.playSound(this.player, CompatibleSound.ENTITY_GENERIC_SPLASH.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(this.player, XSound.ENTITY_GENERIC_SPLASH);
|
||||
}
|
||||
paint();
|
||||
});
|
||||
|
@ -1,10 +1,10 @@
|
||||
package com.songoda.skyblock.gui.coop;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleMaterial;
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.gui.AnvilGui;
|
||||
import com.craftaro.core.gui.Gui;
|
||||
import com.craftaro.core.gui.GuiUtils;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.craftaro.core.utils.ItemUtils;
|
||||
import com.craftaro.core.utils.TextUtils;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
@ -59,7 +59,7 @@ public class GuiCoop extends Gui {
|
||||
|
||||
setButton(0, GuiUtils.createButtonItem(CompatibleMaterial.OAK_FENCE_GATE, // Exit
|
||||
TextUtils.formatText(this.languageLoad.getString("Menu.Coop.Item.Exit.Displayname"))), (event) -> {
|
||||
soundManager.playSound(event.player, CompatibleSound.BLOCK_CHEST_CLOSE.getSound(), 1f, 1f);
|
||||
soundManager.playSound(event.player, XSound.BLOCK_CHEST_CLOSE.);
|
||||
event.player.closeInventory();
|
||||
});
|
||||
|
||||
@ -85,13 +85,13 @@ public class GuiCoop extends Gui {
|
||||
} else {
|
||||
messageManager.sendMessage(event.player,
|
||||
this.languageLoad.getString("Command.Island.Coop.Permission.Message"));
|
||||
soundManager.playSound(event.player, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(event.player, XSound.ENTITY_VILLAGER_NO);
|
||||
}
|
||||
});
|
||||
|
||||
setButton(8, GuiUtils.createButtonItem(CompatibleMaterial.OAK_FENCE_GATE, // Exit
|
||||
TextUtils.formatText(this.languageLoad.getString("Menu.Coop.Item.Exit.Displayname"))), (event) -> {
|
||||
soundManager.playSound(event.player, CompatibleSound.BLOCK_CHEST_CLOSE.getSound(), 1f, 1f);
|
||||
soundManager.playSound(event.player, XSound.BLOCK_CHEST_CLOSE);
|
||||
event.player.closeInventory();
|
||||
});
|
||||
|
||||
@ -105,7 +105,7 @@ public class GuiCoop extends Gui {
|
||||
emptyMeta.setDisplayName(TextUtils.formatText(this.languageLoad.getString("Menu.Coop.Item.Nothing.Displayname")));
|
||||
empty.setItemMeta(emptyMeta);
|
||||
setButton(31, empty, (event) ->
|
||||
soundManager.playSound(event.player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F));
|
||||
soundManager.playSound(event.player, XSound.BLOCK_ANVIL_LAND));
|
||||
} else {
|
||||
this.pages = (int) Math.max(1, Math.ceil((double) coopPlayers.size() / 36d));
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
package com.songoda.skyblock.gui.coop;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleMaterial;
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.gui.Gui;
|
||||
import com.craftaro.core.gui.GuiUtils;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.craftaro.core.utils.TextUtils;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.island.Island;
|
||||
@ -45,12 +45,12 @@ public class GuiCoopChoose extends Gui {
|
||||
|
||||
setButton(0, GuiUtils.createButtonItem(CompatibleMaterial.OAK_FENCE_GATE, // Exit
|
||||
TextUtils.formatText(this.languageLoad.getString("Menu.Coop.Item.Exit.Displayname"))), (event) -> {
|
||||
soundManager.playSound(event.player, CompatibleSound.BLOCK_CHEST_CLOSE.getSound(), 1f, 1f);
|
||||
soundManager.playSound(event.player, XSound.BLOCK_CHEST_CLOSE);
|
||||
this.guiManager.showGUI(event.player, this.returnGui);
|
||||
});
|
||||
setButton(8, GuiUtils.createButtonItem(CompatibleMaterial.OAK_FENCE_GATE, // Exit
|
||||
TextUtils.formatText(this.languageLoad.getString("Menu.Coop.Item.Exit.Displayname"))), (event) -> {
|
||||
soundManager.playSound(event.player, CompatibleSound.BLOCK_CHEST_CLOSE.getSound(), 1f, 1f);
|
||||
soundManager.playSound(event.player, XSound.BLOCK_CHEST_CLOSE);
|
||||
this.guiManager.showGUI(event.player, this.returnGui);
|
||||
});
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
package com.songoda.skyblock.gui.permissions;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleMaterial;
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.gui.Gui;
|
||||
import com.craftaro.core.gui.GuiUtils;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.craftaro.core.utils.TextUtils;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.config.FileManager;
|
||||
@ -50,13 +50,13 @@ public class GuiAdminPermissions extends Gui {
|
||||
|
||||
setButton(0, GuiUtils.createButtonItem(CompatibleMaterial.OAK_FENCE_GATE,
|
||||
TextUtils.formatText(this.configLoad.getString("Menu.Settings.Categories.Item.Exit.Displayname"))), (event) -> {
|
||||
this.soundManager.playSound(event.player, CompatibleSound.BLOCK_CHEST_CLOSE.getSound(), 1f, 1f);
|
||||
this.soundManager.playSound(event.player, XSound.BLOCK_CHEST_CLOSE);
|
||||
this.guiManager.showGUI(event.player, this.returnGui);
|
||||
});
|
||||
|
||||
setButton(8, GuiUtils.createButtonItem(CompatibleMaterial.OAK_FENCE_GATE,
|
||||
TextUtils.formatText(this.configLoad.getString("Menu.Settings.Categories.Item.Exit.Displayname"))), (event) -> {
|
||||
this.soundManager.playSound(event.player, CompatibleSound.BLOCK_CHEST_CLOSE.getSound(), 1f, 1f);
|
||||
this.soundManager.playSound(event.player, XSound.BLOCK_CHEST_CLOSE);
|
||||
this.guiManager.showGUI(event.player, this.returnGui);
|
||||
});
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
package com.songoda.skyblock.gui.permissions;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleMaterial;
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.gui.Gui;
|
||||
import com.craftaro.core.gui.GuiUtils;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.craftaro.core.utils.TextUtils;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.gui.GuiSignatureEditor;
|
||||
@ -61,7 +61,7 @@ public class GuiPermissions extends Gui {
|
||||
|
||||
setButton(0, GuiUtils.createButtonItem(CompatibleMaterial.OAK_FENCE_GATE,
|
||||
TextUtils.formatText(this.languageLoad.getString("Menu.Settings.Categories.Item.Exit.Displayname"))), (event) -> {
|
||||
this.soundManager.playSound(event.player, CompatibleSound.BLOCK_CHEST_CLOSE.getSound(), 1f, 1f);
|
||||
this.soundManager.playSound(event.player, XSound.BLOCK_CHEST_CLOSE);
|
||||
this.guiManager.showGUI(event.player, this.returnGui);
|
||||
});
|
||||
|
||||
@ -110,15 +110,15 @@ public class GuiPermissions extends Gui {
|
||||
switch (this.island.getStatus()) {
|
||||
case OPEN:
|
||||
this.plugin.getIslandManager().whitelistIsland(this.island);
|
||||
this.soundManager.playSound(event.player, CompatibleSound.BLOCK_WOODEN_DOOR_CLOSE.getSound(), 1f, 1f);
|
||||
this.soundManager.playSound(event.player, XSound.BLOCK_WOODEN_DOOR_CLOSE);
|
||||
break;
|
||||
case CLOSED:
|
||||
this.plugin.getIslandManager().closeIsland(this.island);
|
||||
this.soundManager.playSound(event.player, CompatibleSound.BLOCK_WOODEN_DOOR_CLOSE.getSound(), 1f, 1f);
|
||||
this.soundManager.playSound(event.player, XSound.BLOCK_WOODEN_DOOR_CLOSE);
|
||||
break;
|
||||
case WHITELISTED:
|
||||
this.island.setStatus(IslandStatus.OPEN);
|
||||
this.soundManager.playSound(event.player, CompatibleSound.BLOCK_WOODEN_DOOR_OPEN.getSound(), 1f, 1f);
|
||||
this.soundManager.playSound(event.player, XSound.BLOCK_WOODEN_DOOR_OPEN);
|
||||
break;
|
||||
}
|
||||
paint();
|
||||
@ -127,7 +127,7 @@ public class GuiPermissions extends Gui {
|
||||
|
||||
setButton(8, GuiUtils.createButtonItem(CompatibleMaterial.OAK_FENCE_GATE,
|
||||
TextUtils.formatText(this.languageLoad.getString("Menu.Settings.Categories.Item.Exit.Displayname"))), (event) -> {
|
||||
this.soundManager.playSound(event.player, CompatibleSound.BLOCK_CHEST_CLOSE.getSound(), 1f, 1f);
|
||||
this.soundManager.playSound(event.player, XSound.BLOCK_CHEST_CLOSE);
|
||||
this.guiManager.showGUI(event.player, this.returnGui);
|
||||
});
|
||||
|
||||
@ -177,7 +177,7 @@ public class GuiPermissions extends Gui {
|
||||
if (!hasPermission(this.island, event.player, this.role)) {
|
||||
this.plugin.getMessageManager().sendMessage(event.player, this.languageLoad
|
||||
.getString("Command.Island.Settings.Permission.Change.Message"));
|
||||
this.soundManager.playSound(event.player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1f, 1f);
|
||||
this.soundManager.playSound(event.player, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
package com.songoda.skyblock.gui.permissions;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleMaterial;
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.gui.Gui;
|
||||
import com.craftaro.core.gui.GuiUtils;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.craftaro.core.utils.TextUtils;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.island.Island;
|
||||
@ -55,7 +55,7 @@ public class GuiPermissionsSelector extends Gui {
|
||||
|
||||
setButton(0, GuiUtils.createButtonItem(CompatibleMaterial.OAK_FENCE_GATE,
|
||||
TextUtils.formatText(configLoad.getString("Menu." + admin + "Settings.Categories.Item.Exit.Displayname"))), (event) -> {
|
||||
plugin.getSoundManager().playSound(event.player, CompatibleSound.BLOCK_CHEST_CLOSE.getSound(), 1f, 1f);
|
||||
plugin.getSoundManager().playSound(event.player, XSound.BLOCK_CHEST_CLOSE);
|
||||
event.player.closeInventory();
|
||||
});
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
package com.songoda.skyblock.gui.wip;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleMaterial;
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.gui.Gui;
|
||||
import com.craftaro.core.gui.GuiUtils;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.craftaro.core.utils.ItemUtils;
|
||||
import com.craftaro.core.utils.TextUtils;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
@ -49,13 +49,13 @@ public class GuiBans extends Gui {
|
||||
|
||||
setButton(0, GuiUtils.createButtonItem(CompatibleMaterial.OAK_FENCE_GATE, // Exit
|
||||
TextUtils.formatText(this.languageLoad.getString("Menu.Bans.Item.Exit.Displayname"))), (event) -> {
|
||||
this.soundManager.playSound(event.player, CompatibleSound.BLOCK_CHEST_CLOSE.getSound(), 1f, 1f);
|
||||
this.soundManager.playSound(event.player, XSound.BLOCK_CHEST_CLOSE);
|
||||
event.player.closeInventory();
|
||||
});
|
||||
|
||||
setButton(8, GuiUtils.createButtonItem(CompatibleMaterial.OAK_FENCE_GATE, // Exit
|
||||
TextUtils.formatText(this.languageLoad.getString("Menu.Bans.Item.Exit.Displayname"))), (event) -> {
|
||||
this.soundManager.playSound(event.player, CompatibleSound.BLOCK_CHEST_CLOSE.getSound(), 1f, 1f);
|
||||
this.soundManager.playSound(event.player, XSound.BLOCK_CHEST_CLOSE);
|
||||
event.player.closeInventory();
|
||||
});
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.invite;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.message.MessageManager;
|
||||
import com.songoda.skyblock.sound.SoundManager;
|
||||
@ -63,13 +63,13 @@ public class InviteTask extends BukkitRunnable {
|
||||
configLoad.getString(
|
||||
"Command.Island.Invite.Invited.Word.Resend"))))
|
||||
.create()))));
|
||||
soundManager.playSound(targetPlayer, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(targetPlayer, XSound.ENTITY_VILLAGER_NO);
|
||||
}
|
||||
|
||||
messageManager.sendMessage(all,
|
||||
configLoad.getString("Command.Island.Invite.Invited.Target.Expired.Message")
|
||||
.replace("%player", invite.getSenderName()));
|
||||
soundManager.playSound(all, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(all, XSound.ENTITY_VILLAGER_NO);
|
||||
|
||||
this.inviteManager.removeInvite(all.getUniqueId());
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.songoda.skyblock.island;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleBiome;
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.craftaro.core.utils.NumberUtils;
|
||||
import com.craftaro.core.utils.PlayerUtils;
|
||||
import com.craftaro.core.world.SWorldBorder;
|
||||
@ -976,7 +976,7 @@ public class Island {
|
||||
.getString("Island.Unlock." + type.name() + ".Message").replace(
|
||||
"%cost%", NumberUtils.formatNumber(price)));
|
||||
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
if (type == IslandWorld.END) {
|
||||
player.setVelocity(player.getLocation().getDirection().multiply(-.50).setY(.6f));
|
||||
} else if (type == IslandWorld.NETHER) {
|
||||
|
@ -5,8 +5,8 @@ import com.bekvon.bukkit.residence.containers.Flags;
|
||||
import com.bekvon.bukkit.residence.protection.ClaimedResidence;
|
||||
import com.craftaro.core.compatibility.CompatibleBiome;
|
||||
import com.craftaro.core.compatibility.CompatibleMaterial;
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.compatibility.ServerVersion;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.craftaro.core.world.SWorldBorder;
|
||||
import com.eatthepath.uuid.FastUUID;
|
||||
import com.google.common.base.Preconditions;
|
||||
@ -230,7 +230,7 @@ public class IslandManager {
|
||||
|
||||
if (fileManager.getConfig(new File(this.plugin.getDataFolder(), "locations.yml")).getFileConfiguration().getString("Location.Spawn") == null) {
|
||||
this.plugin.getMessageManager().sendMessage(player, this.plugin.getLanguage().getString("Island.Creator.Error.Message"));
|
||||
this.plugin.getSoundManager().playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
this.plugin.getSoundManager().playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
return false;
|
||||
}
|
||||
@ -332,7 +332,7 @@ public class IslandManager {
|
||||
|
||||
if (fileManager.getConfig(new File(this.plugin.getDataFolder(), "locations.yml")).getFileConfiguration().getString("Location.Spawn") == null) {
|
||||
this.plugin.getMessageManager().sendMessage(player, configLang.getString("Island.Creator.Error.Message"));
|
||||
this.plugin.getSoundManager().playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
this.plugin.getSoundManager().playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
return false;
|
||||
}
|
||||
@ -1628,7 +1628,7 @@ public class IslandManager {
|
||||
messageManager.sendMessage(targetPlayer, configLoad.getString("Island.Coop.Removed.Owner.Message"));
|
||||
}
|
||||
|
||||
soundManager.playSound(targetPlayer, CompatibleSound.ENTITY_IRON_GOLEM_ATTACK.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(targetPlayer, XSound.ENTITY_IRON_GOLEM_ATTACK);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
package com.songoda.skyblock.listeners;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleMaterial;
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.compatibility.ServerVersion;
|
||||
import com.craftaro.core.hooks.LogManager;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.craftaro.core.utils.NumberUtils;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
@ -182,7 +182,7 @@ public class BlockListeners implements Listener {
|
||||
if (configLoad.getBoolean("Island.Spawn.Protection")) {
|
||||
event.setCancelled(true);
|
||||
this.plugin.getMessageManager().sendMessage(player, this.plugin.getLanguage().getString("Island.SpawnProtection.Break.Message"));
|
||||
this.plugin.getSoundManager().playSound(player, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
this.plugin.getSoundManager().playSound(player, XSound.ENTITY_VILLAGER_NO);
|
||||
}
|
||||
}
|
||||
|
||||
@ -343,7 +343,7 @@ public class BlockListeners implements Listener {
|
||||
|
||||
if (isObstructing) {
|
||||
this.plugin.getMessageManager().sendMessage(player, this.plugin.getLanguage().getString("Island.SpawnProtection.Place.Message"));
|
||||
this.plugin.getSoundManager().playSound(player, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
this.plugin.getSoundManager().playSound(player, XSound.ENTITY_VILLAGER_NO);
|
||||
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
@ -372,7 +372,7 @@ public class BlockListeners implements Listener {
|
||||
|
||||
this.plugin.getMessageManager().sendMessage(player, this.plugin.getLanguage().getString("Island.Limit.Block.Exceeded.Message")
|
||||
.replace("%type", WordUtils.capitalizeFully(material.name().replace("_", " "))).replace("%limit", NumberUtils.formatNumber(limit)));
|
||||
this.plugin.getSoundManager().playSound(player, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
this.plugin.getSoundManager().playSound(player, XSound.ENTITY_VILLAGER_NO);
|
||||
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
@ -459,19 +459,19 @@ public class BlockListeners implements Listener {
|
||||
}
|
||||
if ((((ent instanceof Blaze || ent instanceof MagmaCube) || ent instanceof Wither) || ent instanceof Ghast) || witherSkeleton) {
|
||||
event.setCancelled(true);
|
||||
event.getToBlock().getWorld().playSound(block.getLocation(), CompatibleSound.BLOCK_FIRE_EXTINGUISH.getSound(), 1f, 1f);
|
||||
XSound.BLOCK_FIRE_EXTINGUISH.play(block.getLocation());
|
||||
event.getToBlock().getWorld().playEffect(block.getLocation(), Effect.SMOKE, 1);
|
||||
} else {
|
||||
if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_16)) {
|
||||
if (((ent instanceof Piglin || ent instanceof Hoglin) || ent instanceof Strider) || ent instanceof Zoglin) {
|
||||
event.setCancelled(true);
|
||||
event.getToBlock().getWorld().playSound(block.getLocation(), CompatibleSound.BLOCK_FIRE_EXTINGUISH.getSound(), 1f, 1f);
|
||||
XSound.BLOCK_FIRE_EXTINGUISH.play(block.getLocation());
|
||||
event.getToBlock().getWorld().playEffect(block.getLocation(), Effect.SMOKE, 1);
|
||||
}
|
||||
} else {
|
||||
if (ent instanceof PigZombie) {
|
||||
event.setCancelled(true);
|
||||
event.getToBlock().getWorld().playSound(block.getLocation(), CompatibleSound.BLOCK_FIRE_EXTINGUISH.getSound(), 1f, 1f);
|
||||
XSound.BLOCK_FIRE_EXTINGUISH.play(block.getLocation());
|
||||
event.getToBlock().getWorld().playEffect(block.getLocation(), Effect.SMOKE, 1);
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.songoda.skyblock.listeners;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleMaterial;
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.island.Island;
|
||||
import com.songoda.skyblock.island.IslandManager;
|
||||
@ -71,9 +71,8 @@ public class BucketListeners implements Listener {
|
||||
IslandWorld world = worldManager.getIslandWorld(block.getWorld());
|
||||
if (LocationUtil.isLocationAffectingIslandSpawn(block.getLocation(), island, world)) {
|
||||
event.setCancelled(true);
|
||||
this.plugin.getMessageManager().sendMessage(player,
|
||||
this.plugin.getLanguage().getString("Island.SpawnProtection.Place.Message"));
|
||||
this.plugin.getSoundManager().playSound(player, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
this.plugin.getMessageManager().sendMessage(player, this.plugin.getLanguage().getString("Island.SpawnProtection.Place.Message"));
|
||||
this.plugin.getSoundManager().playSound(player, XSound.ENTITY_VILLAGER_NO);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,8 +2,8 @@ package com.songoda.skyblock.listeners;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleHand;
|
||||
import com.craftaro.core.compatibility.CompatibleMaterial;
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.hooks.LogManager;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.craftaro.core.utils.ItemUtils;
|
||||
import com.craftaro.core.utils.NumberUtils;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
@ -119,7 +119,7 @@ public class InteractListeners implements Listener {
|
||||
|
||||
if (isObstructing) {
|
||||
this.plugin.getMessageManager().sendMessage(player, this.plugin.getLanguage().getString("Island.SpawnProtection.Place.Message"));
|
||||
this.plugin.getSoundManager().playSound(player, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
this.plugin.getSoundManager().playSound(player, XSound.ENTITY_VILLAGER_NO);
|
||||
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
@ -134,7 +134,7 @@ public class InteractListeners implements Listener {
|
||||
|
||||
this.plugin.getMessageManager().sendMessage(player, this.plugin.getLanguage().getString("Island.Limit.Block.Exceeded.Message")
|
||||
.replace("%type", WordUtils.capitalizeFully(itemMaterial.name().replace("_", " "))).replace("%limit", NumberUtils.formatNumber(limit)));
|
||||
this.plugin.getSoundManager().playSound(player, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
this.plugin.getSoundManager().playSound(player, XSound.ENTITY_VILLAGER_NO);
|
||||
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
@ -212,7 +212,7 @@ public class InteractListeners implements Listener {
|
||||
this.plugin.getMessageManager().sendMessage(player,
|
||||
this.plugin.getFileManager().getConfig(new File(this.plugin.getDataFolder(), "language.yml")).getFileConfiguration().getString("Island.Limit.Block.Exceeded.Message")
|
||||
.replace("%type", WordUtils.capitalizeFully(material.name().replace("_", " "))).replace("%limit", NumberUtils.formatNumber(limit)));
|
||||
this.plugin.getSoundManager().playSound(player, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
this.plugin.getSoundManager().playSound(player, XSound.ENTITY_VILLAGER_NO);
|
||||
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
@ -306,7 +306,7 @@ public class InteractListeners implements Listener {
|
||||
if (this.plugin.getFileManager().getConfig(new File(this.plugin.getDataFolder(), "config.yml"))
|
||||
.getFileConfiguration().getBoolean("Island.Block.Obsidian.Enable")) {
|
||||
|
||||
this.plugin.getSoundManager().playSound(block.getLocation(), CompatibleSound.BLOCK_FIRE_EXTINGUISH.getSound(), 1.0F, 1.0F);
|
||||
this.plugin.getSoundManager().playSound(block.getLocation(), XSound.BLOCK_FIRE_EXTINGUISH);
|
||||
block.setType(CompatibleMaterial.AIR.getBlockMaterial());
|
||||
|
||||
ItemUtils.takeActiveItem(player, CompatibleHand.getHand(event));
|
||||
@ -369,7 +369,7 @@ public class InteractListeners implements Listener {
|
||||
}
|
||||
}
|
||||
|
||||
this.plugin.getSoundManager().playSound(player, CompatibleSound.ENTITY_CHICKEN_EGG.getSound(), 10.0F, 10.0F);
|
||||
this.plugin.getSoundManager().playSound(player, XSound.ENTITY_CHICKEN_EGG, 10, 10);
|
||||
|
||||
event.setCancelled(true);
|
||||
}
|
||||
@ -414,7 +414,7 @@ public class InteractListeners implements Listener {
|
||||
messageManager.sendMessage(player,
|
||||
this.plugin.getFileManager().getConfig(new File(this.plugin.getDataFolder(), "language.yml")).getFileConfiguration().getString("Island.Structure.Tool.Position.Message")
|
||||
.replace("%position", "1"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_WOODEN_BUTTON_CLICK_ON.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_WOODEN_BUTTON_CLICK_ON);
|
||||
}
|
||||
}
|
||||
} else if (event.getAction() == Action.RIGHT_CLICK_BLOCK) {
|
||||
@ -432,7 +432,7 @@ public class InteractListeners implements Listener {
|
||||
messageManager.sendMessage(player,
|
||||
this.plugin.getFileManager().getConfig(new File(this.plugin.getDataFolder(), "language.yml")).getFileConfiguration().getString("Island.Structure.Tool.Position.Message")
|
||||
.replace("%position", "2"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_WOODEN_BUTTON_CLICK_ON.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_WOODEN_BUTTON_CLICK_ON);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.songoda.skyblock.listeners;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.compatibility.ServerVersion;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.island.Island;
|
||||
import com.songoda.skyblock.island.IslandEnvironment;
|
||||
@ -85,7 +85,7 @@ public class MoveListeners implements Listener {
|
||||
}
|
||||
|
||||
LocationUtil.teleportPlayerToSpawn(player);
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_ENDERMAN_TELEPORT.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_ENDERMAN_TELEPORT);
|
||||
}
|
||||
}
|
||||
|
||||
@ -143,7 +143,7 @@ public class MoveListeners implements Listener {
|
||||
}
|
||||
|
||||
player.setFallDistance(0.0F);
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_ENDERMAN_TELEPORT.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_ENDERMAN_TELEPORT);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@ -156,9 +156,8 @@ public class MoveListeners implements Listener {
|
||||
player.setFallDistance(0.0F);
|
||||
}
|
||||
|
||||
messageManager.sendMessage(player, this.plugin.getLanguage()
|
||||
.getString("Island.WorldBorder.Outside.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_ENDERMAN_TELEPORT.getSound(), 1.0F, 1.0F);
|
||||
messageManager.sendMessage(player, this.plugin.getLanguage().getString("Island.WorldBorder.Outside.Message"));
|
||||
soundManager.playSound(player, XSound.ENTITY_ENDERMAN_TELEPORT);
|
||||
}
|
||||
}
|
||||
|
||||
@ -187,9 +186,8 @@ public class MoveListeners implements Listener {
|
||||
|
||||
LocationUtil.teleportPlayerToSpawn(player);
|
||||
|
||||
messageManager.sendMessage(player,
|
||||
this.plugin.getLanguage().getString("Island.WorldBorder.Disappeared.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_ENDERMAN_TELEPORT.getSound(), 1.0F, 1.0F);
|
||||
messageManager.sendMessage(player, this.plugin.getLanguage().getString("Island.WorldBorder.Disappeared.Message"));
|
||||
soundManager.playSound(player, XSound.ENTITY_ENDERMAN_TELEPORT);
|
||||
});
|
||||
});
|
||||
}
|
||||
@ -250,7 +248,7 @@ public class MoveListeners implements Listener {
|
||||
if (!configLoad.getBoolean("Island.Teleport.FallDamage", true)) {
|
||||
player.setFallDistance(0.0F);
|
||||
}
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_ENDERMAN_TELEPORT.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_ENDERMAN_TELEPORT);
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||
@ -265,9 +263,8 @@ public class MoveListeners implements Listener {
|
||||
&& (!e.getTo().getWorld().equals(e.getFrom().getWorld()) || e.getTo().distance(e.getFrom()) > 1.0d)) { // We should not care of self block tp
|
||||
if (this.plugin.getIslandManager().getIslandAtLocation(e.getTo()) == null) {
|
||||
e.setCancelled(true);
|
||||
this.plugin.getMessageManager().sendMessage(player,
|
||||
this.plugin.getLanguage().getString("Island.WorldBorder.Disappeared.Message"));
|
||||
this.plugin.getSoundManager().playSound(player, CompatibleSound.ENTITY_ENDERMAN_TELEPORT.getSound(), 1.0F, 1.0F);
|
||||
this.plugin.getMessageManager().sendMessage(player, this.plugin.getLanguage().getString("Island.WorldBorder.Disappeared.Message"));
|
||||
this.plugin.getSoundManager().playSound(player, XSound.ENTITY_ENDERMAN_TELEPORT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.songoda.skyblock.listeners;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleMaterial;
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.island.Island;
|
||||
import com.songoda.skyblock.island.IslandEnvironment;
|
||||
@ -111,7 +111,7 @@ public class PortalListeners implements Listener {
|
||||
}
|
||||
if (tick.getTick() >= 100) {
|
||||
messageManager.sendMessage(player, this.plugin.getLanguage().getString("Island.Portal.Stuck.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_ENDERMAN_TELEPORT.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_ENDERMAN_TELEPORT);
|
||||
LocationUtil.teleportPlayerToSpawn(player);
|
||||
return;
|
||||
}
|
||||
@ -148,7 +148,7 @@ public class PortalListeners implements Listener {
|
||||
IslandWorld toWorldF = toWorld;
|
||||
|
||||
Bukkit.getScheduler().scheduleSyncDelayedTask(this.plugin, () -> PaperLib.teleportAsync(player, island.getLocation(toWorldF, spawnEnvironment)), 1L);
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_ENDERMAN_TELEPORT.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_ENDERMAN_TELEPORT);
|
||||
player.setFallDistance(0.0F);
|
||||
tick.setTick(1);
|
||||
break;
|
||||
@ -175,7 +175,7 @@ public class PortalListeners implements Listener {
|
||||
Location finalLoc = loc;
|
||||
PaperLib.teleportAsync(player, finalLoc);
|
||||
}, 1L);
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_ENDERMAN_TELEPORT.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_ENDERMAN_TELEPORT);
|
||||
player.setFallDistance(0.0F);
|
||||
tick.setTick(1);
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.listeners;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.challenge.player.PlayerManager;
|
||||
import com.songoda.skyblock.cooldown.CooldownManager;
|
||||
@ -144,7 +144,7 @@ public class QuitListeners implements Listener {
|
||||
this.plugin.getLanguage()
|
||||
.getString("Command.Island.Invite.Invited.Sender.Disconnected.Message")
|
||||
.replace("%player", player.getName()));
|
||||
this.plugin.getSoundManager().playSound(targetPlayer, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
this.plugin.getSoundManager().playSound(targetPlayer, XSound.ENTITY_VILLAGER_NO);
|
||||
}
|
||||
|
||||
inviteManager.removeInvite(player.getUniqueId());
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.songoda.skyblock.listeners;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleMaterial;
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.api.event.player.PlayerIslandEnterEvent;
|
||||
import com.songoda.skyblock.api.event.player.PlayerIslandExitEvent;
|
||||
@ -98,14 +98,14 @@ public class TeleportListeners implements Listener {
|
||||
event.setCancelled(true);
|
||||
|
||||
messageManager.sendMessage(player, configLoad.getString("Island.Visit.Closed.Plugin.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
return;
|
||||
} else if (this.plugin.getConfiguration().getBoolean("Island.Visitor.Banning") && island.getBan().isBanned(player.getUniqueId())) {
|
||||
event.setCancelled(true);
|
||||
|
||||
messageManager.sendMessage(player, configLoad.getString("Island.Visit.Banned.Teleport.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
package com.songoda.skyblock.menus;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleMaterial;
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.gui.AnvilGui;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.craftaro.core.utils.ItemUtils;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.island.Island;
|
||||
@ -59,13 +59,13 @@ public class Bans {
|
||||
if (island1 == null) {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Bans.Owner.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
return;
|
||||
} else if (!plugin.getConfiguration().getBoolean("Island.Visitor.Banning")) {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Bans.Disabled.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -75,18 +75,18 @@ public class Bans {
|
||||
if ((is.getType() == CompatibleMaterial.BLACK_STAINED_GLASS_PANE.getMaterial()) && (is.hasItemMeta())
|
||||
&& (is.getItemMeta().getDisplayName().equals(plugin.formatText(
|
||||
configLoad.getString("Menu.Bans.Item.Barrier.Displayname"))))) {
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_GLASS_BREAK.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_GLASS_BREAK);
|
||||
|
||||
event.setWillClose(false);
|
||||
event.setWillDestroy(false);
|
||||
} else if ((is.getType() == CompatibleMaterial.OAK_FENCE_GATE.getMaterial()) && (is.hasItemMeta())
|
||||
&& (is.getItemMeta().getDisplayName().equals(plugin.formatText(
|
||||
configLoad.getString("Menu.Bans.Item.Exit.Displayname"))))) {
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_CHEST_CLOSE.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_CHEST_CLOSE);
|
||||
} else if ((is.getType() == Material.PAINTING) && (is.hasItemMeta())
|
||||
&& (is.getItemMeta().getDisplayName().equals(plugin.formatText(
|
||||
configLoad.getString("Menu.Bans.Item.Information.Displayname"))))) {
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_WOODEN_BUTTON_CLICK_ON.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_WOODEN_BUTTON_CLICK_ON);
|
||||
|
||||
Bukkit.getServer().getScheduler().runTaskLater(plugin, () -> {
|
||||
AnvilGui gui = new AnvilGui(player);
|
||||
@ -109,7 +109,7 @@ public class Bans {
|
||||
} else if ((is.getType() == Material.BARRIER) && (is.hasItemMeta())
|
||||
&& (is.getItemMeta().getDisplayName().equals(plugin.formatText(
|
||||
configLoad.getString("Menu.Bans.Item.Nothing.Displayname"))))) {
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
event.setWillClose(false);
|
||||
event.setWillDestroy(false);
|
||||
@ -117,13 +117,13 @@ public class Bans {
|
||||
if (is.getItemMeta().getDisplayName().equals(plugin.formatText(
|
||||
configLoad.getString("Menu.Bans.Item.Previous.Displayname")))) {
|
||||
playerData1.setPage(MenuType.BANS, playerData1.getPage(MenuType.BANS) - 1);
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_ARROW_HIT.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_ARROW_HIT);
|
||||
|
||||
Bukkit.getServer().getScheduler().runTaskLater(plugin, () -> open(player), 1L);
|
||||
} else if (is.getItemMeta().getDisplayName().equals(plugin.formatText(
|
||||
configLoad.getString("Menu.Bans.Item.Next.Displayname")))) {
|
||||
playerData1.setPage(MenuType.BANS, playerData1.getPage(MenuType.BANS) + 1);
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_ARROW_HIT.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_ARROW_HIT);
|
||||
|
||||
Bukkit.getServer().getScheduler().runTaskLater(plugin, () -> open(player), 1L);
|
||||
} else {
|
||||
@ -136,9 +136,8 @@ public class Bans {
|
||||
Bukkit.getServer().getScheduler().runTaskLater(plugin,
|
||||
() -> open(player), 3L);
|
||||
} else {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Bans.Permission.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Bans.Permission.Message"));
|
||||
soundManager.playSound(player, XSound.ENTITY_VILLAGER_NO);
|
||||
|
||||
event.setWillClose(false);
|
||||
event.setWillDestroy(false);
|
||||
|
@ -2,7 +2,7 @@ package com.songoda.skyblock.menus;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleBiome;
|
||||
import com.craftaro.core.compatibility.CompatibleMaterial;
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.biome.BiomeManager;
|
||||
import com.songoda.skyblock.cooldown.Cooldown;
|
||||
@ -62,7 +62,7 @@ public class Biome {
|
||||
if (island == null) {
|
||||
messageManager.sendMessage(player,
|
||||
langConfig.getString("Command.Island.Biome.Owner.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
player.closeInventory();
|
||||
|
||||
return;
|
||||
@ -71,7 +71,7 @@ public class Biome {
|
||||
|| island.hasRole(IslandRole.OWNER, player.getUniqueId()))) {
|
||||
messageManager.sendMessage(player,
|
||||
langConfig.getString("Command.Island.Biome.Permission.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_VILLAGER_NO);
|
||||
player.closeInventory();
|
||||
|
||||
return;
|
||||
@ -82,7 +82,7 @@ public class Biome {
|
||||
if ((is.getType() == Material.NAME_TAG) && (is.hasItemMeta())
|
||||
&& (is.getItemMeta().getDisplayName().equals(ChatColor.translateAlternateColorCodes('&',
|
||||
langConfig.getString("Menu.Biome.Item.Info.Displayname"))))) {
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_CHICKEN_EGG.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_CHICKEN_EGG);
|
||||
|
||||
event.setWillClose(false);
|
||||
event.setWillDestroy(false);
|
||||
@ -90,17 +90,17 @@ public class Biome {
|
||||
&& (is.hasItemMeta())
|
||||
&& (is.getItemMeta().getDisplayName().equals(ChatColor.translateAlternateColorCodes('&',
|
||||
langConfig.getString("Menu.Biome.Item.Barrier.Displayname"))))) {
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_GLASS_BREAK.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_GLASS_BREAK);
|
||||
|
||||
event.setWillClose(false);
|
||||
event.setWillDestroy(false);
|
||||
} else if ((is.getType() == CompatibleMaterial.OAK_FENCE_GATE.getMaterial()) && (is.hasItemMeta())
|
||||
&& (is.getItemMeta().getDisplayName().equals(ChatColor.translateAlternateColorCodes('&',
|
||||
langConfig.getString("Menu.Biome.Item.Exit.Displayname"))))) {
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_CHEST_CLOSE.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_CHEST_CLOSE);
|
||||
} else {
|
||||
if (is.getItemMeta().hasEnchant(Enchantment.THORNS)) {
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
event.setWillClose(false);
|
||||
event.setWillDestroy(false);
|
||||
@ -125,7 +125,7 @@ public class Biome {
|
||||
+ langConfig.getString("Island.Biome.Cooldown.Word.Second")));
|
||||
}
|
||||
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_VILLAGER_NO);
|
||||
|
||||
event.setWillClose(false);
|
||||
event.setWillDestroy(false);
|
||||
@ -142,10 +142,10 @@ public class Biome {
|
||||
island.save();
|
||||
|
||||
soundManager.playSound(island.getLocation(IslandWorld.NORMAL, IslandEnvironment.ISLAND),
|
||||
CompatibleSound.ENTITY_GENERIC_SPLASH.getSound(), 1.0F, 1.0F);
|
||||
XSound.ENTITY_GENERIC_SPLASH);
|
||||
|
||||
if (!islandManager.isPlayerAtIsland(island, player, IslandWorld.NORMAL)) {
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_GENERIC_SPLASH.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_GENERIC_SPLASH);
|
||||
}
|
||||
|
||||
Bukkit.getServer().getScheduler().runTaskLater(plugin, () -> open(player), 1L);
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.songoda.skyblock.menus;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleMaterial;
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.craftaro.core.world.SWorldBorder;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.island.Island;
|
||||
@ -44,7 +44,7 @@ public class Border {
|
||||
|
||||
if (island == null) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Border.Owner.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
return;
|
||||
} else if (!((island.hasRole(IslandRole.OPERATOR, player.getUniqueId())
|
||||
@ -52,12 +52,12 @@ public class Border {
|
||||
|| island.hasRole(IslandRole.OWNER, player.getUniqueId()))) {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Border.Permission.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_VILLAGER_NO);
|
||||
|
||||
return;
|
||||
} else if (!plugin.getConfiguration().getBoolean("Island.WorldBorder.Enable")) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Border.Disabled.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -67,14 +67,14 @@ public class Border {
|
||||
if ((is.getType() == CompatibleMaterial.OAK_FENCE_GATE.getMaterial()) && (is.hasItemMeta())
|
||||
&& (is.getItemMeta().getDisplayName().equals(ChatColor.translateAlternateColorCodes('&',
|
||||
configLoad.getString("Menu.Border.Item.Exit.Displayname"))))) {
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_CHEST_CLOSE.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_CHEST_CLOSE);
|
||||
} else if ((is.getType() == Material.TRIPWIRE_HOOK) && (is.hasItemMeta())
|
||||
&& (is.getItemMeta().getDisplayName().equals(ChatColor.translateAlternateColorCodes('&',
|
||||
configLoad.getString("Menu.Border.Item.Toggle.Displayname"))))) {
|
||||
island.setBorder(!island.isBorder());
|
||||
|
||||
islandManager.updateBorder(island);
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_WOODEN_BUTTON_CLICK_ON.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_WOODEN_BUTTON_CLICK_ON);
|
||||
|
||||
Bukkit.getServer().getScheduler().runTaskLater(plugin, () -> open(player), 1L);
|
||||
} else if ((is.getType() == CompatibleMaterial.LIGHT_BLUE_DYE.getMaterial()) && (is.hasItemMeta())
|
||||
@ -83,7 +83,7 @@ public class Border {
|
||||
configLoad.getString("Menu.Border.Item.Color.Displayname").replace("%color",
|
||||
configLoad.getString("Menu.Border.Item.Word.Blue")))))) {
|
||||
if (island.getBorderColor() == SWorldBorder.Color.Blue) {
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_CHICKEN_EGG.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_CHICKEN_EGG);
|
||||
|
||||
event.setWillClose(false);
|
||||
event.setWillDestroy(false);
|
||||
@ -91,7 +91,7 @@ public class Border {
|
||||
island.setBorderColor(SWorldBorder.Color.Blue);
|
||||
islandManager.updateBorder(island);
|
||||
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_WOODEN_BUTTON_CLICK_ON.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_WOODEN_BUTTON_CLICK_ON);
|
||||
|
||||
Bukkit.getServer().getScheduler().runTaskLater(plugin, () -> open(player), 1L);
|
||||
}
|
||||
@ -101,7 +101,7 @@ public class Border {
|
||||
configLoad.getString("Menu.Border.Item.Color.Displayname").replace("%color",
|
||||
configLoad.getString("Menu.Border.Item.Word.Green")))))) {
|
||||
if (island.getBorderColor() == SWorldBorder.Color.Green) {
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_CHICKEN_EGG.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_CHICKEN_EGG);
|
||||
|
||||
event.setWillClose(false);
|
||||
event.setWillDestroy(false);
|
||||
@ -109,7 +109,7 @@ public class Border {
|
||||
island.setBorderColor(SWorldBorder.Color.Green);
|
||||
islandManager.updateBorder(island);
|
||||
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_WOODEN_BUTTON_CLICK_ON.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_WOODEN_BUTTON_CLICK_ON);
|
||||
|
||||
Bukkit.getServer().getScheduler().runTaskLater(plugin, () -> open(player), 1L);
|
||||
}
|
||||
@ -119,7 +119,7 @@ public class Border {
|
||||
configLoad.getString("Menu.Border.Item.Color.Displayname").replace("%color",
|
||||
configLoad.getString("Menu.Border.Item.Word.Red")))))) {
|
||||
if (island.getBorderColor() == SWorldBorder.Color.Red) {
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_CHICKEN_EGG.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_CHICKEN_EGG);
|
||||
|
||||
event.setWillClose(false);
|
||||
event.setWillDestroy(false);
|
||||
@ -127,7 +127,7 @@ public class Border {
|
||||
island.setBorderColor(SWorldBorder.Color.Red);
|
||||
islandManager.updateBorder(island);
|
||||
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_WOODEN_BUTTON_CLICK_ON.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_WOODEN_BUTTON_CLICK_ON);
|
||||
|
||||
Bukkit.getServer().getScheduler().runTaskLater(plugin, () -> open(player), 1L);
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.songoda.skyblock.menus;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleMaterial;
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.island.Island;
|
||||
import com.songoda.skyblock.utils.item.MenuClickRegistry;
|
||||
@ -48,7 +48,7 @@ public final class ControlPanel {
|
||||
});
|
||||
|
||||
executors.put(RegistryKey.fromLanguageFile("Menu.ControlPanel.Item.Barrier.Displayname", CompatibleMaterial.BLACK_STAINED_GLASS_PANE), (inst, player, e) -> {
|
||||
inst.getSoundManager().playSound(player, CompatibleSound.BLOCK_GLASS_BREAK.getSound(), 1.0F, 1.0F);
|
||||
inst.getSoundManager().playSound(player, XSound.BLOCK_GLASS_BREAK);
|
||||
|
||||
e.setWillClose(false);
|
||||
e.setWillDestroy(false);
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.songoda.skyblock.menus;
|
||||
|
||||
import com.craftaro.core.compatibility.CompatibleSound;
|
||||
import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.config.FileManager;
|
||||
import com.songoda.skyblock.cooldown.Cooldown;
|
||||
@ -69,7 +69,7 @@ public class Creator {
|
||||
if (availableStructures.isEmpty()) {
|
||||
plugin.getMessageManager().sendMessage(player,
|
||||
configLoad.getString("Island.Creator.Selector.None.Message"));
|
||||
plugin.getSoundManager().playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
plugin.getSoundManager().playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
return;
|
||||
} else if (availableStructures.size() <= 9) {
|
||||
@ -89,7 +89,7 @@ public class Creator {
|
||||
nInventoryUtil nInv = new nInventoryUtil(player, event -> {
|
||||
if (islandManager.getIsland(player) != null) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Create.Owner.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_VILLAGER_NO);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -110,7 +110,7 @@ public class Creator {
|
||||
&& !player.hasPermission("fabledskyblock.*")) {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Island.Creator.Selector.Permission.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
Bukkit.getServer().getScheduler().runTaskLater(plugin,
|
||||
() -> open(player), 1L);
|
||||
@ -123,9 +123,8 @@ public class Creator {
|
||||
new File(new File(plugin.getDataFolder().toString() + "/" +
|
||||
(structureList.getOverworldFile().endsWith(".structure") ? "structures" : "schematics")),
|
||||
structureList.getOverworldFile()))) {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Island.Creator.Selector.File.Overworld.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
messageManager.sendMessage(player, configLoad.getString("Island.Creator.Selector.File.Overworld.Message"));
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
event.setWillClose(false);
|
||||
event.setWillDestroy(false);
|
||||
@ -135,9 +134,8 @@ public class Creator {
|
||||
new File(new File(plugin.getDataFolder().toString() + "/" +
|
||||
(structureList.getNetherFile().endsWith(".structure") ? "structures" : "schematics")),
|
||||
structureList.getNetherFile()))) {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Island.Creator.Selector.File.Nether.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
messageManager.sendMessage(player, configLoad.getString("Island.Creator.Selector.File.Nether.Message"));
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
event.setWillClose(false);
|
||||
event.setWillDestroy(false);
|
||||
@ -147,9 +145,8 @@ public class Creator {
|
||||
new File(new File(plugin.getDataFolder().toString() + "/" +
|
||||
(structureList.getEndFile().endsWith(".structure") ? "structures" : "schematics")),
|
||||
structureList.getEndFile()))) {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Island.Creator.Selector.File.End.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
|
||||
messageManager.sendMessage(player, configLoad.getString("Island.Creator.Selector.File.End.Message"));
|
||||
soundManager.playSound(player, XSound.BLOCK_ANVIL_LAND);
|
||||
|
||||
event.setWillClose(false);
|
||||
event.setWillDestroy(false);
|
||||
@ -182,7 +179,7 @@ public class Creator {
|
||||
"Island.Creator.Selector.Cooldown.Word.Second")));
|
||||
}
|
||||
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_VILLAGER_NO);
|
||||
|
||||
event.setWillClose(false);
|
||||
event.setWillDestroy(false);
|
||||
@ -190,9 +187,8 @@ public class Creator {
|
||||
}
|
||||
|
||||
if (islandManager.createIsland(player, structureList)) {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Island.Creator.Selector.Created.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_NOTE_BLOCK_PLING.getSound(), 1.0F, 1.0F);
|
||||
messageManager.sendMessage(player, configLoad.getString("Island.Creator.Selector.Created.Message"));
|
||||
soundManager.playSound(player, XSound.BLOCK_NOTE_BLOCK_PLING);
|
||||
}
|
||||
} else if (event.getClick().isRightClick()) {
|
||||
if (fileManager.getConfig(new File(plugin.getDataFolder(), "config.yml"))
|
||||
@ -219,7 +215,7 @@ public class Creator {
|
||||
"Island.Preview.Cooldown.Word.Second")));
|
||||
}
|
||||
|
||||
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_NO.getSound(), 1.0F, 1.0F);
|
||||
soundManager.playSound(player, XSound.ENTITY_VILLAGER_NO);
|
||||
event.setWillClose(false);
|
||||
event.setWillDestroy(false);
|
||||
|
||||
@ -227,9 +223,8 @@ public class Creator {
|
||||
}
|
||||
|
||||
if (islandManager.previewIsland(player, structureList)) {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Island.Creator.Selector.Preview.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_NOTE_BLOCK_PLING.getSound(), 1.0F, 1.0F);
|
||||
messageManager.sendMessage(player, configLoad.getString("Island.Creator.Selector.Preview.Message"));
|
||||
soundManager.playSound(player, XSound.BLOCK_NOTE_BLOCK_PLING);
|
||||
}
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user