-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #72 from discomal101/master
Added A Toggle To Discord RPC
- Loading branch information
Showing
4 changed files
with
53 additions
and
17 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
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
33 changes: 33 additions & 0 deletions
33
src/main/java/net/aoba/module/modules/misc/DiscordRPCModule.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,33 @@ | ||
package net.aoba.module.modules.misc; | ||
|
||
import net.aoba.module.Category; | ||
import net.aoba.module.Module; | ||
import net.aoba.utils.discord.RPCManager; | ||
|
||
public class DiscordRPCModule extends Module { | ||
|
||
public DiscordRPCModule() { | ||
super("DiscordRPC"); | ||
|
||
this.setCategory(Category.of("Misc")); | ||
this.setDescription("Toggles Discord RPC On and Off"); | ||
} | ||
|
||
@Override | ||
public void onDisable() { | ||
RPCManager rpcManager = new RPCManager(); | ||
rpcManager.stopRpc(); | ||
// Turns the Discord RPC Off | ||
} | ||
|
||
@Override | ||
public void onEnable() { | ||
RPCManager rpcManager = new RPCManager(); | ||
rpcManager.startRpc(); | ||
// Turns the Discord RPC On | ||
} | ||
|
||
@Override | ||
public void onToggle() { // OnEnable And Disable Handle | ||
} | ||
} |
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