MCPcopy Create free account
hub / github.com/ZetaMap/MoreCommands / write

Method write

src/main/java/util/ALog.java:14–24  ·  view source on GitHub ↗
(String label, String text, Object... arg)

Source from the content-addressed store, hash-verified

12 public static boolean isEnabled = true;
13
14 public static void write(String label, String text, Object... arg) {
15 if (isEnabled) {
16 file.writeString(Strings.format("[@] [@] @\n",
17 java.time.format.DateTimeFormatter.ofPattern("MM-dd-yyyy HH:mm:ss").format(java.time.LocalDateTime.now()), label, Strings.format(text, arg)), true);
18
19 if (file.length() > maxSize) {
20 Log.warn("Admin logs --> file '@ALog-@.txt reached the limit of 1 MB. Creating new file ...", PVars.ALogPath, files);
21 newFile();
22 }
23 }
24 }
25
26 public static void init() {
27 //init settings

Callers 5

initEventsMethod · 0.95
bansCommandMethod · 0.95
checkNameMethod · 0.80

Calls 2

newFileMethod · 0.95
warnMethod · 0.80

Tested by

no test coverage detected