Skip to content

Commit

Permalink
适配新版slimefun的声音系统
Browse files Browse the repository at this point in the history
  • Loading branch information
XXY233 committed Sep 2, 2023
1 parent 15b2cde commit b225508
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
22 changes: 14 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -138,17 +138,23 @@
</dependency>

<dependency>
<groupId>com.github.Slimefun</groupId>
<groupId>com.github.StarWishsama</groupId>
<artifactId>Slimefun4</artifactId>
<version>RC-31</version>
<version>2023.07.22</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>io.github.thebusybiscuit</groupId>
<artifactId>cscorelib2</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- <dependency>-->
<!-- <groupId>com.github.Slimefun</groupId>-->
<!-- <artifactId>Slimefun4</artifactId>-->
<!-- <version>RC-31</version>-->
<!-- <scope>provided</scope>-->
<!-- <exclusions>-->
<!-- <exclusion>-->
<!-- <groupId>io.github.thebusybiscuit</groupId>-->
<!-- <artifactId>cscorelib2</artifactId>-->
<!-- </exclusion>-->
<!-- </exclusions>-->
<!-- </dependency>-->

<dependency>
<groupId>org.bstats</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import javax.annotation.Nullable;
import javax.annotation.ParametersAreNonnullByDefault;

import io.github.thebusybiscuit.slimefun4.core.services.sounds.SoundEffect;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.entity.Player;
Expand Down Expand Up @@ -69,7 +70,7 @@ protected final void open(Player p, PlayerProfile profile, SlimefunGuideMode mod

SurvivalSlimefunGuide guide = (SurvivalSlimefunGuide) Slimefun.getRegistry().getSlimefunGuide(mode);
menu.setEmptySlotsClickable(false);
menu.addMenuOpeningHandler(pl -> pl.playSound(pl.getLocation(), guide.getSound(), 1, 1));
menu.addMenuOpeningHandler(pl -> pl.playSound(pl.getLocation(), SoundEffect.GUIDE_BUTTON_CLICK_SOUND.getDefaultSoundId(), 1, 1));
guide.createHeader(p, profile, menu);

// remove the search
Expand Down

0 comments on commit b225508

Please sign in to comment.