Quiz system permissions fix

This commit is contained in:
2020-11-10 00:52:54 +01:00
parent 714093fd34
commit 6e6e3a1b34
4 changed files with 42 additions and 24 deletions

View File

@@ -1,4 +1,5 @@
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
@@ -28,20 +29,20 @@ public class RedeemCommandListeners implements Listener, CommandExecutor {
dbConn.remove_toclaim(discordid);
Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "eco give " + p.getName() + rewards);
p.sendMessage("You received " + rewards + " dollars!");
p.sendMessage(ChatColor.GREEN + "You received " + rewards + " dollars!");
return true;
}else{
p.sendMessage("You have no money to claim!");
p.sendMessage(ChatColor.RED + "You have no money to claim!");
}
}else{
p.sendMessage("Your account is not linked with discord");
p.sendMessage(ChatColor.RED + "Your account is not linked with discord");
}
return true;
}
}else{
sender.sendMessage("Only players can use this command!");
sender.sendMessage(ChatColor.RED + "Only players can use this command!");
return true;
}