aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/thatgravyboat/skyblockhud/commands
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/thatgravyboat/skyblockhud/commands')
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/commands/Commands.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/commands/Commands.java b/src/main/java/com/thatgravyboat/skyblockhud/commands/Commands.java
index b3f73cb..90333b5 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/commands/Commands.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/commands/Commands.java
@@ -12,7 +12,10 @@ import com.thatgravyboat.skyblockhud.location.LocationHandler;
import com.thatgravyboat.skyblockhud.playerstats.ActionBarParsing;
import java.awt.*;
import java.awt.datatransfer.StringSelection;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.entity.AbstractClientPlayer;
import net.minecraft.command.ICommandSender;
+import net.minecraft.entity.Entity;
import net.minecraft.entity.boss.BossStatus;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.EnumChatFormatting;
@@ -33,7 +36,7 @@ public class Commands {
}
};
- private static final SimpleSubCommand devCommand = new SimpleSubCommand("sbhdev", ImmutableSet.of("copyBossBar", "copyScoreboard", "copyActionBar", "mobDeathLogging")) {
+ private static final SimpleSubCommand devCommand = new SimpleSubCommand("sbhdev", ImmutableSet.of("copyNpcSkin", "copyBossBar", "copyScoreboard", "copyActionBar", "mobDeathLogging")) {
@Override
void processSubCommand(ICommandSender sender, String subCommand, String[] args) {
StringSelection clipboard = null;
@@ -49,6 +52,14 @@ public class Commands {
case "copyActionBar":
clipboard = new StringSelection(ActionBarParsing.lastLowActionBar);
break;
+ case "copySkin":
+ Entity entity = Minecraft.getMinecraft().objectMouseOver.entityHit;
+ if (entity instanceof AbstractClientPlayer){
+ clipboard = new StringSelection("http://textures.minecraft.net/texture/"+((AbstractClientPlayer) entity).getLocationSkin().getResourcePath().replace("skins/", ""));
+ }else {
+ sendSBHMessage(sender, "Not a player!");
+ }
+ break;
case "mobDeathLogging":
DevModeConstants.mobDeathLogging = !DevModeConstants.mobDeathLogging;
sendSBHMessage(sender, "Mob Death Logging " + (DevModeConstants.mobDeathLogging ? "Enabled!" : "Disabled!"));