1.22.2
This commit is contained in:
parent
61a6445450
commit
79f916158d
4 changed files with 13 additions and 2 deletions
2
pom.xml
2
pom.xml
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
<groupId>pk.ajneb97</groupId>
|
||||
<artifactId>PlayerKits2</artifactId>
|
||||
<version>1.22.1</version>
|
||||
<version>1.22.2</version>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>21</maven.compiler.source>
|
||||
|
|
|
|||
|
|
@ -405,6 +405,9 @@ public class KitsManager {
|
|||
case "playsound":
|
||||
ActionUtils.playSound(player,actionLine);
|
||||
break;
|
||||
case "playsound_resource_pack":
|
||||
ActionUtils.playSoundResourcePack(player,actionLine);
|
||||
break;
|
||||
case "actionbar":
|
||||
ActionUtils.actionbar(player,actionLine,plugin);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ public class VerifyManager {
|
|||
String[] actionText = action.getAction().split(" ");
|
||||
String actionName = actionText[0];
|
||||
if(actionName.equals("console_command:") || actionName.equals("player_command:")
|
||||
|| actionName.equals("playsound:") || actionName.equals("actionbar:")
|
||||
|| actionName.equals("playsound:") || actionName.equals("playsound_resource_pack:") || actionName.equals("actionbar:")
|
||||
|| actionName.equals("title:") || actionName.equals("firework:")
|
||||
|| actionName.equals("close_inventory") || actionName.equals("message:")){
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -54,6 +54,14 @@ public class ActionUtils {
|
|||
player.playSound(player.getLocation(), sound, volume, pitch);
|
||||
}
|
||||
|
||||
public static void playSoundResourcePack(Player player, String soundLine){
|
||||
String[] sep = soundLine.split(";");
|
||||
String sound = sep[0];
|
||||
float volume = Float.parseFloat(sep[1]);
|
||||
float pitch = Float.parseFloat(sep[2]);
|
||||
player.playSound(player.getLocation(), sound, volume, pitch);
|
||||
}
|
||||
|
||||
private static Sound getSoundByName(String name){
|
||||
try {
|
||||
Class<?> soundTypeClass = Class.forName("org.bukkit.Sound");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue