ReportReason .java

net.minecraft.client.multiplayer.chat.report.ReportReason (enum, 54 lines): members: I_WANT_TO_REPORT_THEM, HATE_SPEECH, HARASSMENT_OR_BULLYING, title.

net.minecraft.client.multiplayer.chat.reportenum54 linesclient1.7 KB

API Surface (4)

String backendName()
Component title()
Component description()
List<ReportReason> getIncompatibleCategories(final ReportType reportType)

Fields & Constants (3)

backendName
title
description

String literals (13)

"i_want_to_report_them"
"hate_speech"
"harassment_or_bullying"
"self_harm_or_suicide"
"imminent_harm"
"defamation_impersonation_false_information"
"alcohol_tobacco_drugs"
"child_sexual_exploitation_or_abuse"
"terrorism_or_violent_extremism"
"non_consensual_intimate_imagery"
"sexually_inappropriate"
"gui.abuseReport.reason."
".description"

Code Graph: Dependencies (2)

Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.

Full Source

ReportReason.java54 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.client.multiplayer.chat.report;
2
3
import java.util.List;
4
import java.util.Locale;
5
import net.fabricmc.api.EnvType;
6
import net.fabricmc.api.Environment;
7
import net.minecraft.network.chat.Component;
8
9
@Environment(EnvType.CLIENT)
10
public enum ReportReason {
11
	I_WANT_TO_REPORT_THEM("i_want_to_report_them"),
12
	HATE_SPEECH("hate_speech"),
13
	HARASSMENT_OR_BULLYING("harassment_or_bullying"),
14
	SELF_HARM_OR_SUICIDE("self_harm_or_suicide"),
15
	IMMINENT_HARM("imminent_harm"),
16
	DEFAMATION_IMPERSONATION_FALSE_INFORMATION("defamation_impersonation_false_information"),
17
	ALCOHOL_TOBACCO_DRUGS("alcohol_tobacco_drugs"),
18
	CHILD_SEXUAL_EXPLOITATION_OR_ABUSE("child_sexual_exploitation_or_abuse"),
19
	TERRORISM_OR_VIOLENT_EXTREMISM("terrorism_or_violent_extremism"),
20
	NON_CONSENSUAL_INTIMATE_IMAGERY("non_consensual_intimate_imagery"),
21
	SEXUALLY_INAPPROPRIATE("sexually_inappropriate");
22
23
	private final String backendName;
24
	private final Component title;
25
	private final Component description;
26
27
	ReportReason(final String name) {
28
		this.backendName = name.toUpperCase(Locale.ROOT);
29
		String translationKey = "gui.abuseReport.reason." + name;
30
		this.title = Component.translatable(translationKey);
31
		this.description = Component.translatable(translationKey + ".description");
32
	}
33
34
	public String backendName() {
35
		return this.backendName;
36
	}
37
38
	public Component title() {
39
		return this.title;
40
	}
41
42
	public Component description() {
43
		return this.description;
44
	}
45
46
	public static List<ReportReason> getIncompatibleCategories(final ReportType reportType) {
47
		return switch (reportType) {
48
			case CHAT -> List.of(SEXUALLY_INAPPROPRIATE);
49
			case SKIN -> List.of(IMMINENT_HARM, DEFAMATION_IMPERSONATION_FALSE_INFORMATION);
50
			default -> List.of();
51
		};
52
	}
53
}
54

Decompiled Minecraft 26.3 source of ReportReason (net/minecraft/client/multiplayer/chat/report/ReportReason.java) with Mojang official mappings, stored verbatim on the site.