added bug command
This commit is contained in:
parent
d0df7cb760
commit
5210b99c5f
3 changed files with 51 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
||||||
package net.brysonsteck.Resurrection;
|
package net.brysonsteck.Resurrection;
|
||||||
|
|
||||||
import net.brysonsteck.Resurrection.commands.CommandAbout;
|
import net.brysonsteck.Resurrection.commands.CommandAbout;
|
||||||
|
import net.brysonsteck.Resurrection.commands.CommandBug;
|
||||||
import net.brysonsteck.Resurrection.commands.CommandHowLong;
|
import net.brysonsteck.Resurrection.commands.CommandHowLong;
|
||||||
import net.brysonsteck.Resurrection.commands.CommandResurrect;
|
import net.brysonsteck.Resurrection.commands.CommandResurrect;
|
||||||
import net.brysonsteck.Resurrection.player.PlayerListener;
|
import net.brysonsteck.Resurrection.player.PlayerListener;
|
||||||
|
@ -93,6 +94,7 @@ public class Resurrection extends JavaPlugin implements Listener {
|
||||||
|
|
||||||
// register commands
|
// register commands
|
||||||
this.getCommand("about").setExecutor(new CommandAbout(pluginInfo.getVersion(), outdated));
|
this.getCommand("about").setExecutor(new CommandAbout(pluginInfo.getVersion(), outdated));
|
||||||
|
this.getCommand("bug").setExecutor(new CommandBug());
|
||||||
this.getCommand("resurrect").setExecutor(new CommandResurrect());
|
this.getCommand("resurrect").setExecutor(new CommandResurrect());
|
||||||
this.getCommand("howlong").setExecutor(new CommandHowLong());
|
this.getCommand("howlong").setExecutor(new CommandHowLong());
|
||||||
|
|
||||||
|
|
44
src/net/brysonsteck/Resurrection/commands/CommandBug.java
Normal file
44
src/net/brysonsteck/Resurrection/commands/CommandBug.java
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
package net.brysonsteck.Resurrection.commands;
|
||||||
|
|
||||||
|
import net.brysonsteck.Resurrection.Resurrection;
|
||||||
|
import org.bukkit.ChatColor;
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandExecutor;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
|
|
||||||
|
public class CommandBug implements CommandExecutor {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onCommand(CommandSender commandSender, Command command, String s, String[] strings) {
|
||||||
|
if (commandSender instanceof Player) {
|
||||||
|
commandSender.sendMessage(ChatColor.YELLOW + "Did you find a bug? Well that sucks for you.");
|
||||||
|
new BukkitRunnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
commandSender.sendMessage("");
|
||||||
|
commandSender.sendMessage(ChatColor.YELLOW + "Okay, fine. Maybe I'll tell you how to fix the problem. Hehe.");
|
||||||
|
commandSender.sendMessage(ChatColor.YELLOW + "You can either create an issue on GitHub here: " + ChatColor.BLUE + "https://github.com/brysonsteck/resurrection/issues");
|
||||||
|
commandSender.sendMessage(ChatColor.YELLOW + "OR you can contact me on Discord if you don't know how to use GitHub: " + ChatColor.GREEN + "bryzinga#9971");
|
||||||
|
commandSender.sendMessage(ChatColor.YELLOW + "Please prepare to explain how the bug occurred regardless of how you report the bug to me.");
|
||||||
|
}
|
||||||
|
}.runTaskLater(JavaPlugin.getProvidingPlugin(Resurrection.class), 60);
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
System.out.println("[Resurrection] Did you find a bug? Well that sucks for you.");
|
||||||
|
new BukkitRunnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
System.out.println("[Resurrection] ");
|
||||||
|
System.out.println("[Resurrection] Okay, fine. Maybe I'll tell you how to fix the problem. Hehe.");
|
||||||
|
System.out.println("[Resurrection] You can either create an issue on GitHub here: https://github.com/brysonsteck/resurrection/issues");
|
||||||
|
System.out.println("[Resurrection] OR you can contact me on Discord if you don't know how to use GitHub: bryzinga#9971");
|
||||||
|
System.out.println("[Resurrection] Please prepare to explain how the bug occurred regardless of how you report the bug to me.");
|
||||||
|
}
|
||||||
|
}.runTaskLater(JavaPlugin.getProvidingPlugin(Resurrection.class), 60);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -15,4 +15,8 @@ commands:
|
||||||
resurrect:
|
resurrect:
|
||||||
description: Manually resurrects a player.
|
description: Manually resurrects a player.
|
||||||
permission: op
|
permission: op
|
||||||
usage: /resurrect PLAYER_NAME
|
usage: /resurrect PLAYER_NAME
|
||||||
|
|
||||||
|
bug:
|
||||||
|
description: Displays contact info if you encounter a bug.
|
||||||
|
usage: /bug
|
Loading…
Add table
Reference in a new issue