Skip to content
This repository was archived by the owner on Aug 18, 2020. It is now read-only.

Commit 94d1632

Browse files
committed
Add RCON Support
1 parent 702cf57 commit 94d1632

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
package org.codeoverflow.chatoverflow.api.io.output;
2+
3+
public interface RconOutput extends Output {
4+
5+
String sendCommand(String command);
6+
}

src/main/java/org/codeoverflow/chatoverflow/api/plugin/configuration/Output.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package org.codeoverflow.chatoverflow.api.plugin.configuration;
22

33
import org.codeoverflow.chatoverflow.api.io.output.FileOutput;
4+
import org.codeoverflow.chatoverflow.api.io.output.RconOutput;
45
import org.codeoverflow.chatoverflow.api.io.output.SerialOutput;
56
import org.codeoverflow.chatoverflow.api.io.output.chat.DiscordChatOutput;
67
import org.codeoverflow.chatoverflow.api.io.output.chat.TwitchChatOutput;
@@ -62,6 +63,18 @@ public Requirement<FileOutput> file(String uniqueRequirementId, String displayNa
6263
return requirements.requireOutput(uniqueRequirementId, displayName, isOptional, FileOutput.class);
6364
}
6465

66+
/**
67+
* Requires a game server with enabled rcon
68+
*
69+
* @param uniqueRequirementId any unique id by which your plugin can identify the requirement
70+
* @param displayName Is displayed to the framework user and to tell him what to enter
71+
* @param isOptional true if this requirement is optional, false if mandatory
72+
* @return the requirement object
73+
*/
74+
public Requirement<RconOutput> rcon(String uniqueRequirementId, String displayName, boolean isOptional) {
75+
return requirements.requireOutput(uniqueRequirementId, displayName, isOptional, RconOutput.class);
76+
}
77+
6578
// Add more outputs here
6679

6780
}

0 commit comments

Comments
 (0)