Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Changes
Page history
Update Drawing to the galaxy map
authored
Nov 13, 2020
by
Jake
Show whitespace changes
Inline
Side-by-side
Drawing-to-the-galaxy-map.md
View page @
c856876c
...
@@ -143,3 +143,19 @@ public class MyGameMapListener implements GameMapDrawListener {
...
@@ -143,3 +143,19 @@ public class MyGameMapListener implements GameMapDrawListener {
# Siding
# Siding
-
This is all client-side.
-
This is all client-side.
# Registering your listener
-
Map drawing is called too many times to be a regular event, so it's done through FastListeners.
```
java
private
MyGameMapListener
myGameMapListener
;
@Override
public
void
onDisable
()
{
FastListenerCommon
.
getGameMapListeners
().
remove
(
myGameMapListener
);
}
@Override
public
void
onEnable
()
{
myGameMapListener
=
new
MyGameMapListener
();
FastListenerCommon
.
getGameMapListeners
().
add
(
myGameMapListener
);
}
```