- Status
- Offline
- Joined
- Jul 18, 2023
- Messages
- 707
- Reaction score
- 3
Welcome to this thread where you can find free and downloadable Minecraft resources under the section "Minecraft Cheat Sources." Rest assured, we have thoroughly tested all the sources provided here, ensuring they work effectively in one way or another.
DuelWinner:
Code:
private static Setting<Boolean> relog = new Setting<>("Relog", true);
public DuelWinner() {
super("DuelWinner", "Автоматически выигрывает дуэли, которые вы просили", Category.EXPLOIT);
}
private Timer killTimer = new Timer();
public void onEnable() {
disconnect.set(false);
}
private AtomicBoolean disconnect = new AtomicBoolean(false);
@EventTarget
public void onUpdate(UpdateEvent event) {
if (mc.player == null || mc.world == null || mc.currentScreen instanceof GuiDownloadTerrain) return;
if (event.getPhase() == TickEvent.Phase.START && disconnect.get()) {
disconnect.set(false);
String serverIP = "";
if (relog.getValue() && mc.getCurrentServerData() != null && mc.getCurrentServerData().serverIP != null) {
serverIP = mc.getCurrentServerData().serverIP;
}
if (mc.world != null) {
mc.world.sendQuittingDisconnectingPacket();
}
killTimer.setTime(0);
if (relog.getValue() && serverIP != null) {
mc.displayGuiScreen(new GuiConnecting(null, mc, new ServerData("Congratulations on your victory!", serverIP, false)));
} else {
mc.loadWorld((WorldClient) null);
mc.displayGuiScreen(new GuiMainMenu());
}
}
}
@EventTarget
public void onPacketReceive(PacketEvent.Receive event) {
if (mc.world == null || mc.player == null || mc.currentScreen instanceof GuiDownloadTerrain) return;
if (event.getPacket() instanceof SPacketChat) {
if (((SPacketChat) event.getPacket()).getChatComponent() != null && ((SPacketChat) event.getPacket()).getChatComponent().getUnformattedText() != null) {
if (((SPacketChat) event.getPacket()).getChatComponent().getUnformattedText().toLowerCase().contains(mc.player.getName().toLowerCase()) && ((SPacketChat) event.getPacket()).getChatComponent().getUnformattedText().toLowerCase().contains("suicide")) {
event.setCancelled(true);
} else if (((SPacketChat) event.getPacket()).getChatComponent().getUnformattedText().toLowerCase().contains("duel request sent to")) {
mc.player.connection.sendPacket(new CPacketChatMessage("/kill"));
killTimer.reset();
}
}
} else if (event.getPacket() instanceof SPacketTitle) {
if (((SPacketTitle) event.getPacket()).getMessage() != null && ((SPacketTitle) event.getPacket()).getMessage().getUnformattedText() != null) {
if (((SPacketTitle) event.getPacket()).getMessage().getUnformattedText().equals("GO!")) {
disconnect.set(true);
}
}
}
}
@EventTarget
public void onLoadGuiScreen(LoadGuiEvent event) {
if (event.getGui() instanceof GuiGameOver && !killTimer.hasPassed(30000)) {
event.setCancelled(true);
}
}
}