Skip to content

Commit

Permalink
chore: もう少しレアに
Browse files Browse the repository at this point in the history
  • Loading branch information
m1sk9 committed Oct 11, 2024
1 parent e76905c commit 9cda7c0
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command
MainMenu mainMenu = new MainMenu();
mainMenu.sendMenu(player);

Random random = new Random();
// 5%の確率でクリーパーの効果音を再生
if (random.nextInt(100) < 5) {
// 0.122%の確率でクリーパーの効果音を再生
if (new Random().nextDouble() < 0.000122) {
player.playSound(player.getLocation(), Sound.ENTITY_CREEPER_PRIMED, 10, 1);
player.playSound(player.getLocation(), Sound.ENTITY_GENERIC_EXPLODE, 10, 1);
Message.sendSuccessMessage(player, "[管理AI]", "§c§oメニューを開きました...ヮ! クリーパーが... (´・ω・`)");
Expand Down

0 comments on commit 9cda7c0

Please sign in to comment.