mirror of
https://github.com/itHotL/PlayerStats.git
synced 2025-02-08 00:21:23 +01:00
Found out ChatColor.of(java.awt.Color) is a thing. Having an existential crisis.
This commit is contained in:
parent
b207622a24
commit
8be8d7962a
@ -5,6 +5,7 @@
|
||||
<configuration>
|
||||
<autoDetectTypes>
|
||||
<platformType>SPIGOT</platformType>
|
||||
<platformType>ADVENTURE</platformType>
|
||||
</autoDetectTypes>
|
||||
</configuration>
|
||||
</facet>
|
||||
|
@ -18,7 +18,7 @@ import org.bukkit.command.PluginCommand;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class Main extends JavaPlugin {
|
||||
public final class Main extends JavaPlugin {
|
||||
|
||||
private static BukkitAudiences adventure;
|
||||
private static PlayerStats playerStatsAPI;
|
||||
@ -31,6 +31,7 @@ public class Main extends JavaPlugin {
|
||||
|
||||
@Override
|
||||
public void onEnable() {
|
||||
//TODO fix (move these two into initializeMainClasses also, and remove all the Main.get... methods)
|
||||
//first get an instance of all the classes that need to be passed along to different classes
|
||||
ConfigHandler config = new ConfigHandler(this);
|
||||
OfflinePlayerHandler offlinePlayerHandler = new OfflinePlayerHandler();
|
||||
|
@ -4,11 +4,16 @@ import com.gmail.artemis.the.gr8.playerstats.ThreadManager;
|
||||
import com.gmail.artemis.the.gr8.playerstats.msg.OutputManager;
|
||||
import com.gmail.artemis.the.gr8.playerstats.statistic.RequestManager;
|
||||
import com.gmail.artemis.the.gr8.playerstats.models.StatRequest;
|
||||
import net.md_5.bungee.api.ChatColor;
|
||||
import net.md_5.bungee.api.chat.TextComponent;
|
||||
import org.bukkit.Color;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
|
||||
public class StatCommand implements CommandExecutor {
|
||||
|
||||
@ -31,6 +36,13 @@ public class StatCommand implements CommandExecutor {
|
||||
args[0].equalsIgnoreCase("example")) { //in case of "statistic examples", show examples
|
||||
outputManager.sendExamples(sender);
|
||||
}
|
||||
else if (args[0].equalsIgnoreCase(">:(")) {
|
||||
java.awt.Color color = new java.awt.Color(178, 102, 255);
|
||||
ChatColor one = ChatColor.of(color);
|
||||
TextComponent msg = new TextComponent(">:(((((");
|
||||
msg.setColor(one);
|
||||
sender.spigot().sendMessage(msg);
|
||||
}
|
||||
else {
|
||||
StatRequest request = requestManager.generateRequest(sender, args);
|
||||
if (requestManager.validateRequest(request)) {
|
||||
|
Loading…
Reference in New Issue
Block a user