-
Notifications
You must be signed in to change notification settings - Fork 21
Atlas Packet System
Dawson edited this page Mar 22, 2019
·
1 revision
This system is based off aadnk's TinyProtocol, which has been modified by DeprecatedLuke's Anticheat Base. Atlas makes it compatible with versions ranging from 1.7.10 all the way to 1.13.X. It is designed to be easier to use than alternatives, and arguably lighter and more featureful.
Learn how to listen to receiving packets here.
package cc.funkemunky.api.event.custom;
import cc.funkemunky.api.event.system.Cancellable;
import cc.funkemunky.api.event.system.Event;
import lombok.Getter;
import lombok.Setter;
import org.bukkit.entity.Player;
@Getter
public class PacketRecieveEvent extends Event implements Cancellable {
private Player player;
@Setter
private Object packet;
@Setter
private boolean cancelled;
private String type;
private long timeStamp;
public PacketRecieveEvent(Player player, Object packet, String type) {
this.player = player;
this.packet = packet;
this.type = type;
timeStamp = System.currentTimeMillis();
}
}
Learn to listen to packets sent from the server here.
package cc.funkemunky.api.event.custom;
import cc.funkemunky.api.event.system.Cancellable;
import cc.funkemunky.api.event.system.Event;
import lombok.Getter;
import lombok.Setter;
import org.bukkit.entity.Player;
@Getter
public class PacketSendEvent extends Event implements Cancellable {
private Player player;
@Setter
private Object packet;
@Setter
private boolean cancelled;
private String type;
private long timeStamp;
public PacketSendEvent(Player player, Object packet, String type) {
this.player = player;
this.packet = packet;
this.type = type;
timeStamp = System.currentTimeMillis();
}
}