Soncresity Industries Wiki

Command Utilities

Allows execution of commands as a player

Introduction

A fully functional Version of this class has first been introduced in Version 2.2.0

The Command Utilities class allows you to execute commands as a player while being able to customize the permissions, position and rotation.

Class

File: CommandUtils.java

Package: dev.soncresityindustries.es.api.v0.util

Methods

Important information

Arguments enclosed in square brackets ([]) are optional, however, this is not common java syntax!

executeCommands (ServerPlayer source)

public static void executeCommands(@NotNull List<String> commands, @NotNull ServerPlayer player, @NotNull PermissionSet permissionSet, [@NotNull Vec3 position], [@NotNull Vec2 rotation]) {}

Usage

CommandUtils.executeCommands(commands, player, PermissionSet.ALL_PERMISSIONS, player.position(), player.rotation());

executeCommands (MinecraftServer source)

public static void executeCommands(@NotNull List<String> commands, @NotNull MinecraftServer server, @NotNull PermissionSet permissionSet, [@NotNull Vec3 position], [@NotNull Vec2 rotation]) {}

Usage

CommandUtils.executeCommands(commands, server, PermissionSet.ALL_PERMISSIONS, [player.position()], [player.rotation()]);

On this page