Cape module updated to support .reload

This commit is contained in:
noil 2023-05-06 01:40:36 -04:00
parent 6ecd5ea5c1
commit 68dce6df85
1 changed files with 7 additions and 4 deletions

View File

@ -20,10 +20,13 @@ public final class CapeModule extends Module {
@Listener
public void displayCape(EventCapeLocation event) {
if (Minecraft.getMinecraft().player != null && event.getPlayer() == Minecraft.getMinecraft().player) {
final ResourceLocation cape = Seppuku.INSTANCE.getCapeManager().getCape(event.getPlayer());
if (cape != null) {
event.setLocation(cape);
event.setCanceled(true);
String uuid = Minecraft.getMinecraft().player.getUniqueID().toString().replace("-", "");
if (Seppuku.INSTANCE.getCapeManager().hasCape(uuid)) {
final ResourceLocation cape = Seppuku.INSTANCE.getCapeManager().getCape(event.getPlayer());
if (cape != null) {
event.setLocation(cape);
event.setCanceled(true);
}
}
}
}