-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use kit module from Nucleus for the reward service
First register the reward kit with Nucleus `/kit create <name>`. Then register it with BlockyArena `/ba create kit <name>`. To unregister the kit with BlockyArena, execute `/ba remove kit <name>`.
- Loading branch information
Darcy Chen
committed
Jan 26, 2021
1 parent
d8c6055
commit f589f17
Showing
6 changed files
with
41 additions
and
4 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
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
15 changes: 15 additions & 0 deletions
15
src/main/java/io/github/mrdarcychen/commands/RewardService.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,15 @@ | ||
package io.github.mrdarcychen.commands; | ||
|
||
import io.github.mrdarcychen.ConfigManager; | ||
import org.spongepowered.api.Sponge; | ||
import org.spongepowered.api.entity.living.player.Player; | ||
|
||
public class RewardService { | ||
|
||
public static void offer(Player player) { | ||
String kitName = ConfigManager.getInstance().getRewardKitName(); | ||
Sponge.getCommandManager().process(Sponge.getServer().getConsole(), | ||
"kit resetusage " + player.getName() + " " + kitName); | ||
Sponge.getCommandManager().process(player, "kit " + kitName); | ||
} | ||
} |
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