mirror of
https://github.com/eaglerforge/EaglerForgeInjector
synced 2025-07-23 14:11:16 -09:00
Update mobnpcspawner.js
This commit is contained in:
parent
17a1e6ebcf
commit
023a2dd855
@ -1,8 +1,6 @@
|
||||
(() => {
|
||||
PluginAPI.dedicatedServer.appendCode(function () {
|
||||
PluginAPI.addEventListener("processcommand", (event) => {
|
||||
// Check if the sender is a player
|
||||
if (!ModAPI.reflect.getClassById("net.minecraft.entity.player.EntityPlayerMP").instanceOf(event.sender.getRef())) { return; }
|
||||
|
||||
// Check if the command is "/spawnnpc"
|
||||
if (event.command.toLowerCase().startsWith("/spawnnpc")) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user