This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
help() { | |
echo "Usage: ./$0 [project] [version] [output]" | |
exit 0 | |
} | |
check_command() { | |
if ! [ -x "$(command -v $1)" ]; then | |
echo "The $1 command is not available. Install the package related to it and run this script again." | |
exit 1 | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Arrays; | |
public class Coord { | |
public static void main(String[] args) { | |
int x = (int) -Math.pow(2, 32); | |
int y = (int) Math.pow(2, 23) - 1; | |
int z = (int) Math.pow(2, 32); | |
int chunkX = x >> 4; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.wizardlybump17.tests.generic; | |
import lombok.NonNull; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.Scanner; | |
public class Bomba1e2 { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[General] | |
Name=Profile name | |
[Output] | |
Mode=Advanced | |
FilenameFormatting=%CCYY-%MM-%DD %hh-%mm-%ss | |
DelayEnable=false | |
DelaySec=20 | |
DelayPreserve=true | |
Reconnect=true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import lombok.NonNull; | |
import java.util.ArrayList; | |
import java.util.Collections; | |
import java.util.List; | |
import java.util.Scanner; | |
public class Main { | |
public static void main(String[] args) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ProtocolLibrary.getProtocolManager().addPacketListener(new PacketAdapter(this, ListenerPriority.HIGHEST, List.of(PacketType.fromClass(ServerboundContainerClickPacket.class)), ListenerOptions.SYNC) { | |
@Override | |
public void onPacketReceiving(PacketEvent event) { | |
ServerboundContainerClickPacket packet = (ServerboundContainerClickPacket) event.getPacket().getHandle(); | |
ServerPlayer serverPlayer = ((CraftPlayer) event.getPlayer()).getHandle(); | |
PacketUtil.handleContainerClick(packet, serverPlayer); | |
event.setCancelled(true); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# checks if this script was executed correctly | |
if (( $# == 0 )); then | |
echo -e "Usage: $0 <version> [Java path] [--remapped]" | |
exit 2 | |
fi | |
digit_regex="^[0-9]+$" | |
version=$1 | |
IFS="." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public void onPacketSending(PacketEvent event) { | |
ClientboundLoginPacket packet = (ClientboundLoginPacket) event.getPacket().getHandle(); | |
Holder.Reference<DimensionType> dimensionType = (Holder.Reference<DimensionType>) clone((Holder.Reference<?>) packet.dimensionType(), clone(packet.dimensionType().value())); | |
event.setPacket(new PacketContainer( | |
PacketType.fromClass(packet.getClass()), | |
new ClientboundLoginPacket( | |
packet.playerId(), | |
packet.hardcore(), | |
packet.gameType(), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.File; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.net.URL; | |
import java.nio.file.Files; | |
public class BuildToolsExecutor { | |
//java -Dversion=1.19.2 BuildToolsExecutor.java | |
//java -Djava=custom_path -Dversion=1.19.2 BuildToolsExecutor.java |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PersistentDataContainer container = /*your container*/; | |
container.set(KEY, SerializableDataType.INSTANCE, new Location(Bukkit.getWorld("world"), 0, 64, 0)); | |
container.set(KEY, SerializableDataType.INSTANCE, Map.of("test key", "test value")); |
NewerOlder