FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
testing-plugin/src/main/java/com/example/ExamplePlugin.java at master · mjeiding/testing-plugin · GitHub
mjeiding
/
testing-plugin
Public template
forked from
runelite/example-plugin
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
testing-plugin
/
src
/
main
/
java
/
com
/
example
/
ExamplePlugin.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
53 lines (46 loc) · 1.18 KB
Breadcrumbs
testing-plugin
/
src
/
main
/
java
/
com
/
example
/
ExamplePlugin.java
Copy path
File metadata and controls
53 lines (46 loc) · 1.18 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
package
com
.
example
;
import
com
.
google
.
inject
.
Provides
;
import
javax
.
inject
.
Inject
;
import
lombok
.
extern
.
slf4j
.
Slf4j
;
import
net
.
runelite
.
api
.
ChatMessageType
;
import
net
.
runelite
.
api
.
Client
;
import
net
.
runelite
.
api
.
GameState
;
import
net
.
runelite
.
api
.
events
.
GameStateChanged
;
import
net
.
runelite
.
client
.
config
.
ConfigManager
;
import
net
.
runelite
.
client
.
eventbus
.
Subscribe
;
import
net
.
runelite
.
client
.
plugins
.
Plugin
;
import
net
.
runelite
.
client
.
plugins
.
PluginDescriptor
;
@
Slf4j
@
PluginDescriptor
(
name
=
"Example"
)
public
class
ExamplePlugin
extends
Plugin
{
@
Inject
private
Client
client
;
@
Inject
private
ExampleConfig
config
;
@
Override
protected
void
startUp
()
throws
Exception
{
log
.
info
(
"Example started!"
);
}
@
Override
protected
void
shutDown
()
throws
Exception
{
log
.
info
(
"Example stopped!"
);
}
@
Subscribe
public
void
onGameStateChanged
(
GameStateChanged
gameStateChanged
)
{
if
(
gameStateChanged
.
getGameState
() ==
GameState
.
LOGGED_IN
)
{
client
.
addChatMessage
(
ChatMessageType
.
GAMEMESSAGE
,
""
,
"Example says "
+
config
.
greeting
(),
null
);
}
}
@
Provides
ExampleConfig
provideConfig
(
ConfigManager
configManager
)
{
return
configManager
.
getConfig
(
ExampleConfig
.
class
);
}
}
Back
|
FazBrowse Home
|
New Git URL