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>
|
<groupId>pk.ajneb97</groupId>
|
||||||
<artifactId>PlayerKits2</artifactId>
|
<artifactId>PlayerKits2</artifactId>
|
||||||
<version>1.22.1</version>
|
<version>1.22.2</version>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<maven.compiler.source>21</maven.compiler.source>
|
<maven.compiler.source>21</maven.compiler.source>
|
||||||
|
|
|
||||||
|
|
@ -405,6 +405,9 @@ public class KitsManager {
|
||||||
case "playsound":
|
case "playsound":
|
||||||
ActionUtils.playSound(player,actionLine);
|
ActionUtils.playSound(player,actionLine);
|
||||||
break;
|
break;
|
||||||
|
case "playsound_resource_pack":
|
||||||
|
ActionUtils.playSoundResourcePack(player,actionLine);
|
||||||
|
break;
|
||||||
case "actionbar":
|
case "actionbar":
|
||||||
ActionUtils.actionbar(player,actionLine,plugin);
|
ActionUtils.actionbar(player,actionLine,plugin);
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -111,7 +111,7 @@ public class VerifyManager {
|
||||||
String[] actionText = action.getAction().split(" ");
|
String[] actionText = action.getAction().split(" ");
|
||||||
String actionName = actionText[0];
|
String actionName = actionText[0];
|
||||||
if(actionName.equals("console_command:") || actionName.equals("player_command:")
|
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("title:") || actionName.equals("firework:")
|
||||||
|| actionName.equals("close_inventory") || actionName.equals("message:")){
|
|| actionName.equals("close_inventory") || actionName.equals("message:")){
|
||||||
continue;
|
continue;
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,14 @@ public class ActionUtils {
|
||||||
player.playSound(player.getLocation(), sound, volume, pitch);
|
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){
|
private static Sound getSoundByName(String name){
|
||||||
try {
|
try {
|
||||||
Class<?> soundTypeClass = Class.forName("org.bukkit.Sound");
|
Class<?> soundTypeClass = Class.forName("org.bukkit.Sound");
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue