Backport to 1.18.2

This commit is contained in:
zontreck 2024-01-16 19:35:17 -07:00
parent ed20b4f5fb
commit 8eb93ff176
32 changed files with 276 additions and 242 deletions

View file

@ -33,7 +33,12 @@ public class HomeCommand {
private static int home(CommandSourceStack ctx, String homeName)
{
var exec = new CommandExecutionEvent(ctx.getPlayer(), "home");
CommandExecutionEvent exec = null;
try {
exec = new CommandExecutionEvent(ctx.getPlayerOrException(), "home");
} catch (CommandSyntaxException e) {
throw new RuntimeException(e);
}
if(MinecraftForge.EVENT_BUS.post(exec))
{
return 0;