@Nonnull public final static <P> P notnullJ(@Nullable P o, @Nonnull Object... message) { if (o == null) { throw new NullPointerException( "There was a problem with Java: The call '" + join(message) + "' returned null even though it should not be able to do that. Is your Java broken?"); } return o; }
@Nonnull public final static <P> P notnull(@Nullable P o, @Nonnull Object... message) { if (o == null) { throw new NullPointerException( "Houston we have a problem: '" + join(message) + "'. " + "Please report that on our bugtracker unless you are using some old version. Thank you."); } return o; }
@Nonnull public final static <P> P notnullM(@Nullable P o, @Nonnull Object... message) { if (o == null) { throw new NullPointerException("There was a problem with Minecraft: The call '" + join(message) + "' returned null even though it should not be able to do that. Is your Minecraft broken? Did some other mod break it?"); } return o; }
@Nonnull public final static <P> P notnullF(@Nullable P o, @Nonnull Object... message) { if (o == null) { throw new NullPointerException("There was a problem with Forge: The call '" + join(message) + "' returned null even though it should not be able to do that. Is your Forge broken? Did some other mod break it?"); } return o; }
@SuppressWarnings({ "null", "unused" }) @Nonnull public final static <P> P untrusted(@Nonnull P o, @Nonnull Object... message) { if (o == null) { throw new NullPointerException( "There was a problem with Minecraft: The call '" + join(message) + "' returned null even though it says it is not be able to do that. " // + "Your Minecraft is broken. This mod is NOT(!) the cause of this crash!"); } return o; }