-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathCollectionLogMasterPlugin.java
More file actions
90 lines (74 loc) · 2.38 KB
/
CollectionLogMasterPlugin.java
File metadata and controls
90 lines (74 loc) · 2.38 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
package com.collectionlogmaster;
import com.collectionlogmaster.command.TaskmanCommandManager;
import com.collectionlogmaster.input.MouseManager;
import com.collectionlogmaster.synchronization.clog.CollectionLogService;
import com.collectionlogmaster.taskapp.TaskService;
import com.collectionlogmaster.ui.InterfaceManager;
import com.collectionlogmaster.ui.TaskOverlay;
import com.collectionlogmaster.ui.TooltipOverlay;
import com.collectionlogmaster.util.GsonOverride;
import com.google.inject.Injector;
import com.google.inject.Provides;
import javax.inject.Inject;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
import net.runelite.client.config.ConfigManager;
import net.runelite.client.plugins.Plugin;
import net.runelite.client.plugins.PluginDescriptor;
import net.runelite.client.ui.overlay.OverlayManager;
@Slf4j
@PluginDescriptor(
name = "Collection Log Master",
conflicts = {"[DEPRECATED] Collection Log Master"})
public class CollectionLogMasterPlugin extends Plugin {
@Inject
@SuppressWarnings("unused")
private GsonOverride gsonOverride;
@Getter
private static Injector staticInjector;
@Inject
protected TaskOverlay taskOverlay;
@Inject
protected TooltipOverlay tooltipOverlay;
@Inject
private OverlayManager overlayManager;
@Inject
private MouseManager mouseManager;
@Inject
private InterfaceManager interfaceManager;
@Inject
public CollectionLogService collectionLogService;
@Inject
public PluginUpdateNotifier pluginUpdateNotifier;
@Inject
public TaskService taskService;
@Inject
public TaskmanCommandManager taskmanCommand;
@Override
protected void startUp() {
CollectionLogMasterPlugin.staticInjector = getInjector();
mouseManager.startUp();
taskService.startUp();
collectionLogService.startUp();
pluginUpdateNotifier.startUp();
interfaceManager.startUp();
taskmanCommand.startUp();
this.taskOverlay.setResizable(true);
this.overlayManager.add(this.taskOverlay);
this.overlayManager.add(this.tooltipOverlay);
}
@Override
protected void shutDown() {
mouseManager.shutDown();
taskService.shutDown();
collectionLogService.shutDown();
pluginUpdateNotifier.shutDown();
interfaceManager.shutDown();
taskmanCommand.shutDown();
this.overlayManager.remove(this.taskOverlay);
}
@Provides
CollectionLogMasterConfig provideConfig(ConfigManager configManager) {
return configManager.getConfig(CollectionLogMasterConfig.class);
}
}