mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-06-19 07:11:02 +00:00
shouldve seen that, oops.
This commit is contained in:
@@ -342,17 +342,4 @@ public class CommandIris implements DecreeExecutor {
|
|||||||
|
|
||||||
Iris.service(StudioSVC.class).installIntoWorld(sender(), pack.getLoadKey(), folder);
|
Iris.service(StudioSVC.class).installIntoWorld(sender(), pack.getLoadKey(), folder);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Decree(description = "Spawn an entity", aliases = "summon", origin = DecreeOrigin.PLAYER)
|
|
||||||
public void spawn(
|
|
||||||
@Param(description = "The entity to spawn")
|
|
||||||
IrisEntity entity,
|
|
||||||
@Param(description = "The location to spawn the entity at", contextual = true)
|
|
||||||
Vector location
|
|
||||||
) {
|
|
||||||
if (!IrisToolbelt.isIrisWorld(player().getWorld())) {
|
|
||||||
sender().sendMessage(C.RED + "You have to be in an Iris world to spawn entities properly. Trying to spawn the best we can do.");
|
|
||||||
}
|
|
||||||
entity.spawn(engine(), new Location(world(), location.getX(), location.getY(), location.getZ()));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -464,19 +464,16 @@ public class CommandStudio implements DecreeExecutor {
|
|||||||
sender().sendMessage(C.GREEN + "Done! " + report.getPath());
|
sender().sendMessage(C.GREEN + "Done! " + report.getPath());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Decree(description = "Summon an Iris Entity", origin = DecreeOrigin.PLAYER)
|
@Decree(description = "Spawn an Iris entity", aliases = "summon", origin = DecreeOrigin.PLAYER)
|
||||||
public void summon(
|
public void spawn(
|
||||||
@Param(description = "The Iris Entity to spawn")
|
@Param(description = "The entity to spawn")
|
||||||
IrisEntity entity,
|
IrisEntity entity,
|
||||||
@Param(description = "The location at which to spawn the entity", defaultValue = "self")
|
@Param(description = "The location to spawn the entity at", contextual = true)
|
||||||
Vector location
|
Vector location
|
||||||
) {
|
) {
|
||||||
if (!sender().isPlayer()) {
|
if (!IrisToolbelt.isIrisWorld(player().getWorld())) {
|
||||||
sender().sendMessage(C.RED + "Players only (this is a config error. Ask support to add DecreeOrigin.PLAYER to the command you tried to run)");
|
sender().sendMessage(C.RED + "You have to be in an Iris world to spawn entities properly. Trying to spawn the best we can do.");
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sender().sendMessage(C.GREEN + "Spawning entity");
|
|
||||||
entity.spawn(engine(), new Location(world(), location.getX(), location.getY(), location.getZ()));
|
entity.spawn(engine(), new Location(world(), location.getX(), location.getY(), location.getZ()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user