forked from TheCurle/Camelot
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5386e29
commit d63c12f
Showing
7 changed files
with
49 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
config/src/main/groovy/net/neoforged/camelot/config/module/Counters.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package net.neoforged.camelot.config.module | ||
|
||
import groovy.transform.CompileStatic | ||
|
||
/** | ||
* The module responsible for counters. <br> | ||
* <p> | ||
* Counters can be used for... counting things in server. <br> | ||
* A counter can be incremented by sending {@code <counter>++} in chat (and {@code <counter>--} for | ||
* decrementing), and queried using {@code <counter>==}. | ||
*/ | ||
@CompileStatic | ||
class Counters extends ModuleConfiguration { | ||
} |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,4 +12,3 @@ plugins { | |
rootProject.name = 'Camelot' | ||
|
||
include ':config' | ||
include ':sample-config' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
src/main/java/net/neoforged/camelot/module/CountersModule.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package net.neoforged.camelot.module; | ||
|
||
import com.google.auto.service.AutoService; | ||
import net.dv8tion.jda.api.JDABuilder; | ||
import net.neoforged.camelot.config.module.Counters; | ||
import net.neoforged.camelot.listener.CountersListener; | ||
|
||
/** | ||
* The module for counters. | ||
*/ | ||
@AutoService(Counters.class) | ||
public class CountersModule extends CamelotModule.Base<Counters> { | ||
public CountersModule() { | ||
super(Counters.class); | ||
} | ||
|
||
@Override | ||
public String id() { | ||
return "counters"; | ||
} | ||
|
||
@Override | ||
public void registerListeners(JDABuilder builder) { | ||
builder.addEventListeners(new CountersListener()); | ||
} | ||
} |