-
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.
move day value resets to own class, add commands, build integrates sh…
…adowjar
- Loading branch information
Showing
6 changed files
with
95 additions
and
9 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
34 changes: 34 additions & 0 deletions
34
src/main/java/org/evlis/lunamatic/commands/LumaCommand.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,34 @@ | ||
package org.evlis.lunamatic.commands; | ||
|
||
import co.aikar.commands.BaseCommand; | ||
import co.aikar.commands.annotation.*; | ||
import org.bukkit.command.CommandSender; | ||
import org.bukkit.plugin.Plugin; | ||
import org.evlis.lunamatic.GlobalVars; | ||
|
||
@CommandAlias("luma") | ||
public class LumaCommand extends BaseCommand { | ||
|
||
private final Plugin plugin; // stores the reference to your main plugin | ||
|
||
public LumaCommand(Plugin plugin) { | ||
this.plugin = plugin; | ||
} | ||
|
||
@Default | ||
public void defCommand(CommandSender sender) { | ||
// Display GlobalVars status | ||
sender.sendMessage("You are running Lunamatic v" + plugin.getPluginMeta().getVersion()); | ||
} | ||
|
||
@Subcommand("status") | ||
@CommandPermission("myplugin.command.status") | ||
@Description("Displays the status of plugin variables") | ||
public void onStatus(CommandSender sender) { | ||
// Display GlobalVars status | ||
sender.sendMessage("Blood Moon Now: " + GlobalVars.bloodMoonNow); | ||
sender.sendMessage("Blood Moon Today: " + GlobalVars.bloodMoonToday); | ||
sender.sendMessage("Harvest Moon Now: " + GlobalVars.harvestMoonNow); | ||
sender.sendMessage("Harvest Moon Today: " + GlobalVars.harvestMoonToday); | ||
} | ||
} |
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
21 changes: 21 additions & 0 deletions
21
src/main/java/org/evlis/lunamatic/utilities/ResetFlags.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,21 @@ | ||
package org.evlis.lunamatic.utilities; | ||
|
||
import org.bukkit.World; | ||
import org.evlis.lunamatic.GlobalVars; | ||
|
||
public class ResetFlags { | ||
|
||
static TotoroDance totoroDance = new TotoroDance(); | ||
|
||
public static void resetAll() { | ||
|
||
GlobalVars.harvestMoonToday = false; | ||
GlobalVars.harvestMoonNow = false; | ||
GlobalVars.bloodMoonToday = false; | ||
GlobalVars.bloodMoonNow = false; | ||
} | ||
|
||
public static void resetTickSpeed(World world) { | ||
totoroDance.setRandomTickSpeed(world, 3); | ||
} | ||
} |