aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/de/torui/coflsky/configuration/Configuration.java
blob: ed2de05b0a0f976106e85712e8d4dcd2461eb9bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package de.torui.coflsky.configuration;

import de.torui.coflsky.CoflSky;
import de.torui.coflsky.handlers.EventRegistry;

import java.util.regex.Pattern;

public class Configuration {
	public Configuration() {

	}

	private static Configuration instance;

	public static Configuration getInstance() {
		if (instance == null)
			instance = new Configuration();
		return instance;
	}

	public static void setInstance(Configuration config) {
		instance = config;
		CoflSky.config.autoStart = instance.autoStart;
		CoflSky.config.extendedtooltips = instance.extendDescriptions;
		EventRegistry.chatpattern = Pattern.compile(instance.chatRegex, Pattern.CASE_INSENSITIVE);;
	}

	public String chatRegex;
	public boolean collectChat;
	public boolean collectInventory;
	public boolean collectTab;
	public boolean collectScoreboard;
	public boolean allowProxy;
	public boolean collectInvClick;
	public boolean collectChatClicks;
	public boolean collectLobbyChanges;
	public boolean collectEntities;
	public boolean collectLocation;
	public boolean autoStart;
	@Description("Wherever or not to send item descriptions for extending to the server")
	public boolean extendDescriptions;

	@Description("Chat input starting with one of these prefixes is sent to the server")
	public String[] CommandPrefixes;

}