RuneHive-Game
Loading...
Searching...
No Matches
LogEvent.java
Go to the documentation of this file.
1package com.runehive.game.event.impl.log;
2
3import com.runehive.Config;
4import com.runehive.game.event.Event;
5import org.apache.logging.log4j.LogManager;
6import org.apache.logging.log4j.Logger;
7
8import java.time.LocalDateTime;
9
10public abstract class LogEvent implements Event {
11
12 private static final Logger logger = LogManager.getLogger(LogEvent.class);
13 protected final LocalDateTime dateTime = LocalDateTime.now();
14
15 public void log() {
17 return;
18 }
19
20 Thread.startVirtualThread(() -> {
21 try {
22 onLog();
23 } catch (Exception ex) {
24 logger.error(String.format("Error logging %s", this.getClass().getSimpleName()), ex);
25 }
26 });
27 }
28
29 public abstract void onLog() throws Exception;
30
31}
The class that contains setting-related constants for the server.
Definition Config.java:24
static final boolean FORUM_INTEGRATION
If forum integration is true, users can only login if they enter the same username and password that'...
Definition Config.java:117
static final boolean LOG_PLAYER
Definition Config.java:105
Definition Event.kt:9