Added another extra.
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -41,6 +41,7 @@ repositories {
|
|||||||
name = "CodeMC"
|
name = "CodeMC"
|
||||||
url = uri("https://repo.codemc.io/repository/maven-public/")
|
url = uri("https://repo.codemc.io/repository/maven-public/")
|
||||||
}
|
}
|
||||||
|
maven { url 'https://jitpack.io' }
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
@@ -49,7 +50,8 @@ dependencies {
|
|||||||
compileOnly "io.papermc.paper:paper-api:1.21.4-R0.1-SNAPSHOT"
|
compileOnly "io.papermc.paper:paper-api:1.21.4-R0.1-SNAPSHOT"
|
||||||
implementation 'com.google.code.gson:gson:2.10.1'
|
implementation 'com.google.code.gson:gson:2.10.1'
|
||||||
implementation 'org.ow2.asm:asm-commons:9.5'
|
implementation 'org.ow2.asm:asm-commons:9.5'
|
||||||
implementation files("deps/PDK-1.4.0.jar")
|
implementation files("libs/PDK-1.4.0.jar")
|
||||||
|
compileOnly 'com.github.koca2000:NoteBlockAPI:1.6.3'
|
||||||
implementation "com.github.retrooper:packetevents-spigot:2.7.0"
|
implementation "com.github.retrooper:packetevents-spigot:2.7.0"
|
||||||
implementation("de.tr7zw:item-nbt-api:2.14.1")
|
implementation("de.tr7zw:item-nbt-api:2.14.1")
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -72,6 +72,12 @@ public final class Sentinel extends JavaPlugin {
|
|||||||
if (!NBT.preloadApi()) {
|
if (!NBT.preloadApi()) {
|
||||||
getLogger().warning("NBT-API wasn't initialized properly. Sentinel may error out.");
|
getLogger().warning("NBT-API wasn't initialized properly. Sentinel may error out.");
|
||||||
}
|
}
|
||||||
|
boolean NoteBlockAPI = true;
|
||||||
|
if (!Bukkit.getPluginManager().isPluginEnabled("NoteBlockAPI")){
|
||||||
|
getLogger().severe("*** NoteBlockAPI is not installed or not enabled. ***");
|
||||||
|
NoteBlockAPI = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
getLogger().info("Initializing PDK");
|
getLogger().info("Initializing PDK");
|
||||||
PDK.init(this);
|
PDK.init(this);
|
||||||
|
|||||||
@@ -4,6 +4,12 @@ import com.github.retrooper.packetevents.PacketEvents;
|
|||||||
import com.github.retrooper.packetevents.protocol.entity.type.EntityTypes;
|
import com.github.retrooper.packetevents.protocol.entity.type.EntityTypes;
|
||||||
import com.github.retrooper.packetevents.util.Vector3d;
|
import com.github.retrooper.packetevents.util.Vector3d;
|
||||||
import com.github.retrooper.packetevents.wrapper.play.server.*;
|
import com.github.retrooper.packetevents.wrapper.play.server.*;
|
||||||
|
import com.xxmicloxx.NoteBlockAPI.model.Song;
|
||||||
|
import com.xxmicloxx.NoteBlockAPI.model.SoundCategory;
|
||||||
|
import com.xxmicloxx.NoteBlockAPI.songplayer.NoteBlockSongPlayer;
|
||||||
|
import com.xxmicloxx.NoteBlockAPI.songplayer.RadioSongPlayer;
|
||||||
|
import com.xxmicloxx.NoteBlockAPI.songplayer.SongPlayer;
|
||||||
|
import com.xxmicloxx.NoteBlockAPI.utils.NBSDecoder;
|
||||||
import io.github.itzispyder.pdk.commands.Args;
|
import io.github.itzispyder.pdk.commands.Args;
|
||||||
import io.github.itzispyder.pdk.commands.CommandRegistry;
|
import io.github.itzispyder.pdk.commands.CommandRegistry;
|
||||||
import io.github.itzispyder.pdk.commands.CustomCommand;
|
import io.github.itzispyder.pdk.commands.CustomCommand;
|
||||||
@@ -25,6 +31,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.player.PlayerKickEvent;
|
import org.bukkit.event.player.PlayerKickEvent;
|
||||||
|
|
||||||
|
import java.io.InputStream;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
@@ -75,6 +82,24 @@ public class ExtraCommand implements CustomCommand {
|
|||||||
case "hotel" -> spamPlayerWithEntities(sender, victim, target);
|
case "hotel" -> spamPlayerWithEntities(sender, victim, target);
|
||||||
case "india" -> kickPlayerWithoutBackButton(sender, victim, target);
|
case "india" -> kickPlayerWithoutBackButton(sender, victim, target);
|
||||||
case "juliett" -> makePlayerDrowsy(sender,victim,target);
|
case "juliett" -> makePlayerDrowsy(sender,victim,target);
|
||||||
|
case "kilo" -> rickRollPlayer(sender,victim,target);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void rickRollPlayer(CommandSender sender, Player victim, String target) {
|
||||||
|
try (InputStream inputStream = Sentinel.class.getClassLoader().getResourceAsStream("songs/Never Gonna Give You Up.nbs")) {
|
||||||
|
if (inputStream == null) {
|
||||||
|
System.out.println("Resource not found in JAR!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Song rickRoll = NBSDecoder.parse(inputStream);
|
||||||
|
SongPlayer nbsp = new RadioSongPlayer(rickRoll, SoundCategory.MASTER);
|
||||||
|
nbsp.addPlayer(victim);
|
||||||
|
nbsp.setPlaying(true);
|
||||||
|
sender.sendMessage(Text.prefix("Rick rolling %s.".formatted(target)));
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ softdepend:
|
|||||||
- ViaRewind
|
- ViaRewind
|
||||||
- Geyser-Spigot
|
- Geyser-Spigot
|
||||||
- NoChatReports
|
- NoChatReports
|
||||||
|
- NoteBlockAPI
|
||||||
load: POSTWORLD
|
load: POSTWORLD
|
||||||
permissions:
|
permissions:
|
||||||
sentinel.admin:
|
sentinel.admin:
|
||||||
|
|||||||
BIN
src/main/resources/songs/Never Gonna Give You Up.nbs
Normal file
BIN
src/main/resources/songs/Never Gonna Give You Up.nbs
Normal file
Binary file not shown.
Reference in New Issue
Block a user