Log exceptions in notifyPlayersCommandsChanged

I want to remove this try-catch if possible, but don't know why it's
triggered
This commit is contained in:
altrisi committed 2023-04-03 21:47:30 +02:00
1 parent 3ae913c3e6
commit 50c22b6fe2
1 file changed
+5 -1
@@ -1,5 +1,6 @@
package carpet.utils;
import carpet.CarpetSettings;
import net.minecraft.commands.CommandSourceStack;
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.TickTask;
@@ -29,7 +30,10 @@ public final class CommandHelper {
server.getCommands().sendCommands(player);
}
}
catch (NullPointerException ignored) {}
catch (NullPointerException e)
{
CarpetSettings.LOG.warn("Exception while refreshing commands, please report this to Carpet", e);
}
}));
}