Emote service
This commit is contained in:
@@ -104,4 +104,12 @@ public class ServiceClient {
|
|||||||
SaturnClient.LOGGER.error("Failed to buy hat (service): ", e);
|
SaturnClient.LOGGER.error("Failed to buy hat (service): ", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void emote(String emote) {
|
||||||
|
try {
|
||||||
|
session.request(ServiceMethods.Emote, emote).get();
|
||||||
|
} catch (Exception e) {
|
||||||
|
SaturnClient.LOGGER.error("Failed to emote (service): ", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,4 +20,8 @@ public class ServiceMethods {
|
|||||||
String.class, String.class, String.class);
|
String.class, String.class, String.class);
|
||||||
public static final Method<String, String, String> BuyHat = new Method<>("buy_hat",
|
public static final Method<String, String, String> BuyHat = new Method<>("buy_hat",
|
||||||
String.class, String.class, String.class);
|
String.class, String.class, String.class);
|
||||||
|
|
||||||
|
// Emote
|
||||||
|
public static final Method<String, String, String> Emote = new Method<>("emote",
|
||||||
|
String.class, String.class, String.class);
|
||||||
}
|
}
|
||||||
@@ -2,8 +2,7 @@ package org.saturnclient.ui2.screens;
|
|||||||
|
|
||||||
import org.saturnclient.saturnclient.SaturnClient;
|
import org.saturnclient.saturnclient.SaturnClient;
|
||||||
import org.saturnclient.saturnclient.SaturnClientConfig;
|
import org.saturnclient.saturnclient.SaturnClientConfig;
|
||||||
import org.saturnclient.saturnclient.auth.Auth;
|
import org.saturnclient.saturnclient.client.ServiceClient;
|
||||||
// import org.saturnclient.saturnclient.auth.Auth;
|
|
||||||
import org.saturnclient.saturnclient.cosmetics.Emotes;
|
import org.saturnclient.saturnclient.cosmetics.Emotes;
|
||||||
import org.saturnclient.ui2.SaturnScreen;
|
import org.saturnclient.ui2.SaturnScreen;
|
||||||
import org.saturnclient.ui2.Utils;
|
import org.saturnclient.ui2.Utils;
|
||||||
@@ -71,7 +70,7 @@ public class EmoteWheel extends SaturnScreen {
|
|||||||
animationStack.addAnimLayer(1000,
|
animationStack.addAnimLayer(1000,
|
||||||
PlayerAnimationRegistry.getAnimation(Identifier.of("saturnclient",
|
PlayerAnimationRegistry.getAnimation(Identifier.of("saturnclient",
|
||||||
emote)).playAnimation());
|
emote)).playAnimation());
|
||||||
Auth.emote(emote);
|
ServiceClient.emote(emote);
|
||||||
close();
|
close();
|
||||||
}).dimensions(70, 70).centerOffset(width, height, -80 + (col * 80), -35 + (row * 80))
|
}).dimensions(70, 70).centerOffset(width, height, -80 + (col * 80), -35 + (row * 80))
|
||||||
.animation(new Fade(700)));
|
.animation(new Fade(700)));
|
||||||
|
|||||||
Reference in New Issue
Block a user