Skip to content

Commit a175727

Browse files
author
Valandur
committed
Merge branch 'release/v5.1.3'
2 parents 00d34d8 + 12ac7e3 commit a175727

8 files changed

Lines changed: 36 additions & 32 deletions

File tree

docs/MESSAGE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ in the text.
5858
## Responses
5959

6060
To receive the responses (when players click one of the provided options) you must add a
61-
[WebHook](WEBHOOKS.md) for **CUSTOM_MESSAGE**.
61+
[WebHook](WEBHOOKS.md) for **INTERACTIVE_MESSAGE**. (previously CUSTOM_MESSAGE)
6262

6363
The response will look similar to the following:
6464
```json

docs/WEBHOOKS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,14 +145,14 @@ as to when that event is triggered.
145145
| Event / Hook name | Description |
146146
| ------------------- | ----------- |
147147
| ALL | Fired for all events listed below
148-
| CUSTOM_MESSAGE | Use this hook to capture the response from [Messages](MESSAGE.md)
149148
| ACHIEVEMENT | Fired when a player earns a new achievement
150149
| BLOCK_UPDATE_STATUS | Fired when a Web-API BlockUpdate changes status
151150
| CHAT | Fired when a chat message is sent (by players)
152151
| COMMAND | Fired when a command is executed
153152
| GENERATE_CHUNK | Fired when a new chunk is generated
154153
| EXPLOSION | Fired when an explosion happens
155154
| INTERACT_BLOCK | Fired when a player interacts with a block
155+
| INTERACTIVE_MESSAGE | Use this hook to capture the response from [Messages](MESSAGE.md) (prev CUSTOM_MESSAGE)
156156
| INVENTORY_OPEN | Fired when a player opens an inventory
157157
| INVENTORY_CLOSE | Fired when a player closes an inventory
158158
| PLAYER_JOIN | Fired when a player joins the server

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version=5.1.2
1+
version=5.1.3
22
minecraftVersion=1.12.2
33
spongeVersion=7.1
44
jacksonVersion=2.9.4

src/main/java/valandur/webapi/message/InteractiveMessage.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,10 @@ public Boolean isOnce() {
9494
@ApiModelProperty("Clickable options that the player can select from")
9595
@JsonDetails
9696
public List<InteractiveMessageOption> getOptions() {
97-
return new ArrayList<>(options);
97+
if (options != null) {
98+
return new ArrayList<>(options);
99+
}
100+
return new ArrayList<>();
98101
}
99102

100103
/**

src/main/java/valandur/webapi/util/JettyLogger.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@
55

66
public class JettyLogger implements Logger {
77
private org.slf4j.Logger logger;
8-
private boolean enableDebug = true;
8+
private boolean enableDebug;
99

1010
public JettyLogger() {
1111
logger = WebAPI.getLogger();
12+
enableDebug = WebAPI.isDevMode();
1213
}
1314

1415
@Override public String getName() { return "jetty"; }

webapi.iml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<module external.linked.project.id="webapi" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="valandur.webapi" external.system.module.version="5.1.2-S7.1" relativePaths="true" type="JAVA_MODULE" version="4">
2+
<module external.linked.project.id="webapi" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="valandur.webapi" external.system.module.version="5.1.3-S7.1" relativePaths="true" type="JAVA_MODULE" version="4">
33
<component name="NewModuleRootManager" inherit-compiler-output="true">
44
<exclude-output />
55
<content url="file://$MODULE_DIR$">

webapi_main.iml

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<module external.linked.project.id="webapi:main" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="valandur.webapi" external.system.module.type="sourceSet" external.system.module.version="5.1.2-S7.1" type="JAVA_MODULE" version="4">
2+
<module external.linked.project.id="webapi:main" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="valandur.webapi" external.system.module.type="sourceSet" external.system.module.version="5.1.3-S7.1" type="JAVA_MODULE" version="4">
33
<component name="FacetManager">
44
<facet type="minecraft" name="Minecraft">
55
<configuration>
@@ -20,6 +20,7 @@
2020
<orderEntry type="sourceFolder" forTests="false" />
2121
<orderEntry type="library" name="Gradle: co.aikar:minecraft-timings:1.0.4" level="project" />
2222
<orderEntry type="library" name="Gradle: com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.9.4" level="project" />
23+
<orderEntry type="library" name="Gradle: io.sentry:sentry:1.6.4" level="project" />
2324
<orderEntry type="module-library" scope="RUNTIME">
2425
<library>
2526
<CLASSES>
@@ -29,7 +30,6 @@
2930
<SOURCES />
3031
</library>
3132
</orderEntry>
32-
<orderEntry type="library" name="Gradle: io.sentry:sentry:1.6.4" level="project" />
3333
<orderEntry type="library" name="Gradle: com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:2.9.4" level="project" />
3434
<orderEntry type="library" name="Gradle: com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.9.4" level="project" />
3535
<orderEntry type="library" name="Gradle: com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:2.9.4" level="project" />
@@ -86,31 +86,31 @@
8686
<orderEntry type="library" name="Gradle: org.glassfish.hk2:hk2-api:2.5.0-b42" level="project" />
8787
<orderEntry type="library" name="Gradle: org.jvnet.mimepull:mimepull:1.9.6" level="project" />
8888
<orderEntry type="library" name="Gradle: org.eclipse.jetty:jetty-util:9.4.8.v20171121" level="project" />
89-
<orderEntry type="library" scope="PROVIDED" name="Gradle: ninja.leaping.configurate:configurate-core:3.3" level="project" />
90-
<orderEntry type="library" scope="PROVIDED" name="Gradle: :UniversalMarket-1.12.2-v1.1:" level="project" />
9189
<orderEntry type="library" scope="PROVIDED" name="Gradle: org.slf4j:slf4j-api:1.7.25" level="project" />
92-
<orderEntry type="library" scope="PROVIDED" name="Gradle: com.google.inject:guice:4.1.0" level="project" />
93-
<orderEntry type="library" scope="PROVIDED" name="Gradle: com.google.code.findbugs:jsr305:3.0.1" level="project" />
94-
<orderEntry type="library" scope="PROVIDED" name="Gradle: :WebBooks:" level="project" />
95-
<orderEntry type="library" scope="PROVIDED" name="Gradle: com.github.ben-manes.caffeine:caffeine:2.5.4" level="project" />
96-
<orderEntry type="library" scope="PROVIDED" name="Gradle: com.github.ben-manes.caffeine:guava:2.5.4" level="project" />
97-
<orderEntry type="library" scope="PROVIDED" name="Gradle: org.spongepowered:plugin-meta:0.4.1" level="project" />
98-
<orderEntry type="library" scope="PROVIDED" name="Gradle: ninja.leaping.configurate:configurate-gson:3.3" level="project" />
99-
<orderEntry type="library" scope="PROVIDED" name="Gradle: com.flowpowered:flow-math:1.0.3" level="project" />
100-
<orderEntry type="library" scope="PROVIDED" name="Gradle: com.google.code.gson:gson:2.8.0" level="project" />
101-
<orderEntry type="library" scope="PROVIDED" name="Gradle: com.flowpowered:flow-noise:1.0.1-SNAPSHOT" level="project" />
102-
<orderEntry type="library" scope="PROVIDED" name="Gradle: org.ow2.asm:asm:5.2" level="project" />
103-
<orderEntry type="library" scope="PROVIDED" name="Gradle: aopalliance:aopalliance:1.0" level="project" />
104-
<orderEntry type="library" scope="PROVIDED" name="Gradle: com.typesafe:config:1.3.1" level="project" />
105-
<orderEntry type="library" scope="PROVIDED" name="Gradle: :MMCRestrict-1.4.2-API-7:" level="project" />
90+
<orderEntry type="library" scope="PROVIDED" name="Gradle: :UniversalMarket-1.12.2-v1.1:" level="project" />
91+
<orderEntry type="library" scope="PROVIDED" name="Gradle: :RedProtect-7.3.0-b68-Universal:" level="project" />
92+
<orderEntry type="library" scope="PROVIDED" name="Gradle: :HuskyCrates-v1.8.0PRE2-API7:" level="project" />
93+
<orderEntry type="library" scope="PROVIDED" name="Gradle: :Nucleus-1.3.3-S7.0-api:" level="project" />
94+
<orderEntry type="library" scope="PROVIDED" name="Gradle: :CmdScheduler-s7.1-v1.1.0:" level="project" />
95+
<orderEntry type="library" scope="PROVIDED" name="Gradle: :MMCTickets-1.4.1-API-7:" level="project" />
96+
<orderEntry type="library" scope="PROVIDED" name="Gradle: org.spongepowered:spongeapi:7.1.0-SNAPSHOT" level="project" />
97+
<orderEntry type="library" scope="PROVIDED" name="Gradle: ninja.leaping.configurate:configurate-yaml:3.3" level="project" />
10698
<orderEntry type="library" scope="PROVIDED" name="Gradle: ninja.leaping.configurate:configurate-hocon:3.3" level="project" />
99+
<orderEntry type="library" scope="PROVIDED" name="Gradle: :MMCRestrict-1.4.2-API-7:" level="project" />
100+
<orderEntry type="library" scope="PROVIDED" name="Gradle: com.typesafe:config:1.3.1" level="project" />
101+
<orderEntry type="library" scope="PROVIDED" name="Gradle: aopalliance:aopalliance:1.0" level="project" />
102+
<orderEntry type="library" scope="PROVIDED" name="Gradle: org.ow2.asm:asm:5.2" level="project" />
103+
<orderEntry type="library" scope="PROVIDED" name="Gradle: com.flowpowered:flow-noise:1.0.1-SNAPSHOT" level="project" />
104+
<orderEntry type="library" scope="PROVIDED" name="Gradle: com.google.code.gson:gson:2.8.0" level="project" />
105+
<orderEntry type="library" scope="PROVIDED" name="Gradle: com.flowpowered:flow-math:1.0.3" level="project" />
107106
<orderEntry type="library" scope="PROVIDED" name="Gradle: :ActiveTime-s7.1-v1.4.0:" level="project" />
108-
<orderEntry type="library" scope="PROVIDED" name="Gradle: ninja.leaping.configurate:configurate-yaml:3.3" level="project" />
109-
<orderEntry type="library" scope="PROVIDED" name="Gradle: org.spongepowered:spongeapi:7.1.0-SNAPSHOT" level="project" />
110-
<orderEntry type="library" scope="PROVIDED" name="Gradle: :MMCTickets-1.4.1-API-7:" level="project" />
111-
<orderEntry type="library" scope="PROVIDED" name="Gradle: :CmdScheduler-s7.1-v1.1.0:" level="project" />
112-
<orderEntry type="library" scope="PROVIDED" name="Gradle: :Nucleus-1.3.3-S7.0-api:" level="project" />
113-
<orderEntry type="library" scope="PROVIDED" name="Gradle: :HuskyCrates-v1.8.0PRE2-API7:" level="project" />
114-
<orderEntry type="library" scope="PROVIDED" name="Gradle: :RedProtect-7.3.0-b68-Universal:" level="project" />
107+
<orderEntry type="library" scope="PROVIDED" name="Gradle: ninja.leaping.configurate:configurate-gson:3.3" level="project" />
108+
<orderEntry type="library" scope="PROVIDED" name="Gradle: org.spongepowered:plugin-meta:0.4.1" level="project" />
109+
<orderEntry type="library" scope="PROVIDED" name="Gradle: com.github.ben-manes.caffeine:guava:2.5.4" level="project" />
110+
<orderEntry type="library" scope="PROVIDED" name="Gradle: com.github.ben-manes.caffeine:caffeine:2.5.4" level="project" />
111+
<orderEntry type="library" scope="PROVIDED" name="Gradle: :WebBooks:" level="project" />
112+
<orderEntry type="library" scope="PROVIDED" name="Gradle: ninja.leaping.configurate:configurate-core:3.3" level="project" />
113+
<orderEntry type="library" scope="PROVIDED" name="Gradle: com.google.inject:guice:4.1.0" level="project" />
114+
<orderEntry type="library" scope="PROVIDED" name="Gradle: com.google.code.findbugs:jsr305:3.0.1" level="project" />
115115
</component>
116116
</module>

webapi_test.iml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<module external.linked.project.id="webapi:test" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="valandur.webapi" external.system.module.type="sourceSet" external.system.module.version="5.1.2-S7.1" type="JAVA_MODULE" version="4">
2+
<module external.linked.project.id="webapi:test" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="valandur.webapi" external.system.module.type="sourceSet" external.system.module.version="5.1.3-S7.1" type="JAVA_MODULE" version="4">
33
<component name="FacetManager">
44
<facet type="minecraft" name="Minecraft">
55
<configuration />

0 commit comments

Comments
 (0)