Merge remote-tracking branch 'origin/feature/master' into feature/master

This commit is contained in:
Bella 2020-01-23 11:50:38 -05:00
commit f02c0c4bb3
2 changed files with 2 additions and 54 deletions

View File

@ -39,9 +39,8 @@ See [forgehax](https://github.com/fr1kin/forgehax) for an equivalent. Some featu
</details>
## How to download
Press the releases button or [click here](https://github.com/S-B99/KAMI/releases)
<a href="https://www.github.com/S-B99/KAMI/releases">
<img src="https://github.com/S-B99/KAMI/blob/assets/assets/icons/download.svg" width="250"/>
## Status

View File

@ -1,51 +0,0 @@
package me.zeroeightsix.kami.module.modules.bewwawho.misc;
import me.zero.alpine.listener.EventHandler;
import me.zero.alpine.listener.Listener;
import me.zeroeightsix.kami.command.Command;
import me.zeroeightsix.kami.event.events.PacketEvent;
import me.zeroeightsix.kami.module.Module;
import me.zeroeightsix.kami.setting.Setting;
import me.zeroeightsix.kami.setting.Settings;
import net.minecraft.client.Minecraft;
import net.minecraft.network.play.client.CPacketChatMessage;
import net.minecraft.network.play.client.CPacketConfirmTeleport;
@Module.Info(name = "PearlDupe", description = "Duplicates your inventory", category = Module.Category.MISC)
public class PearlDupe extends Module {
private Setting<Boolean> info = register(Settings.b("Info", true));
private Setting<Boolean> warn = register(Settings.b("Warning", true));
private Setting<Boolean> singleplayer = register(Settings.b("SinglePlayer Disable", true));
private Setting<Boolean> disable = register(Settings.b("Disable on death", true));
public void onEnable() {
if (mc.player == null) return;
if (Minecraft.getMinecraft().getCurrentServerData() == null) {
Command.sendErrorMessage("[PearlDupe] Error: &r&4This doesn't work in singleplayer");
if (singleplayer.getValue()) {
this.disable();
}
return;
}
if (info.getValue()) {
Command.sendChatMessage("[PearlDupe] Instructions: throw a pearl, it /kills on teleport ");
Command.sendChatMessage("[PearlDupe] This doesn't always work, and it doesn't work for 2b2t and 9b9t");
}
if (warn.getValue()) {
Command.sendWarningMessage("[PearlDupe] Warning is still on, please disable the option once you've read the instructions");
this.disable();
}
}
@EventHandler
Listener<PacketEvent.Receive> receiveListener = new Listener<>(event -> {
if (event.getPacket() instanceof CPacketConfirmTeleport) {
// if (mc.player == null) return;
Minecraft.getMinecraft().playerController.connection.sendPacket(new CPacketChatMessage("/kill"));
if (disable.getValue()) {
this.disable();
}
}
});
}