-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added .mazaaddbeancoin and changed orders of commands
- Loading branch information
Showing
2 changed files
with
46 additions
and
13 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
30 changes: 30 additions & 0 deletions
30
src/main/java/com/mazawrath/beanbot/commands/maza/MazaAddBeanCoinCommand.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,30 @@ | ||
package com.mazawrath.beanbot.commands.maza; | ||
|
||
import com.mazawrath.beanbot.utilities.Points; | ||
import de.btobastian.sdcf4j.Command; | ||
import de.btobastian.sdcf4j.CommandExecutor; | ||
import org.javacord.api.entity.channel.ServerTextChannel; | ||
import org.javacord.api.entity.server.Server; | ||
import org.javacord.api.entity.user.User; | ||
|
||
public class MazaAddBeanCoinCommand implements CommandExecutor { | ||
private Points points; | ||
|
||
public MazaAddBeanCoinCommand(Points pointsPassed) { | ||
points = pointsPassed; | ||
} | ||
|
||
@Command( | ||
aliases = {"mazaaddbeancoin"}, | ||
privateMessages = false, | ||
showInHelpPage = false | ||
) | ||
|
||
public void onCommand(String command, String user, String pointValue, ServerTextChannel serverTextChannel, User author, Server server) { | ||
if (author.isBotOwner()) { | ||
serverTextChannel.sendMessage("Added " + pointValue + " beanCoin to " + user + "."); | ||
|
||
points.addPoints(user, server.getIdAsString(), Integer.parseInt(pointValue)); | ||
} | ||
} | ||
} |