Make April Great Again #241
@ -23,6 +23,7 @@ import com.comphenix.protocol.PacketType;
|
||||
import com.comphenix.protocol.ProtocolLibrary;
|
||||
import com.comphenix.protocol.events.PacketContainer;
|
||||
import de.steamwar.fightsystem.ArenaMode;
|
||||
import de.steamwar.fightsystem.FightSystem;
|
||||
import de.steamwar.fightsystem.states.FightState;
|
||||
import de.steamwar.fightsystem.states.StateDependentListener;
|
||||
import net.md_5.bungee.api.chat.TextComponent;
|
||||
@ -95,17 +96,19 @@ public class DenyWorldInteraction implements Listener {
|
||||
|
||||
@EventHandler()
|
||||
public void onPlayerJoin(PlayerJoinEvent event) {
|
||||
PacketContainer demo = ProtocolLibrary.getProtocolManager().createPacket(PacketType.Play.Server.GAME_STATE_CHANGE);
|
||||
demo.getBytes().write(0, (byte) 5);
|
||||
demo.getFloat().write(0, 0F);
|
||||
PacketContainer rain = ProtocolLibrary.getProtocolManager().createPacket(PacketType.Play.Server.GAME_STATE_CHANGE);
|
||||
rain.getBytes().write(0, (byte) 7);
|
||||
rain.getFloat().write(0, 5F);
|
||||
try {
|
||||
ProtocolLibrary.getProtocolManager().sendServerPacket(event.getPlayer(), demo);
|
||||
ProtocolLibrary.getProtocolManager().sendServerPacket(event.getPlayer(), rain);
|
||||
} catch (InvocationTargetException e) {
|
||||
throw new SecurityException("Screw this", e);
|
||||
if(FightSystem.ISAPRIL) {
|
||||
PacketContainer demo = ProtocolLibrary.getProtocolManager().createPacket(PacketType.Play.Server.GAME_STATE_CHANGE);
|
||||
demo.getBytes().write(0, (byte) 5);
|
||||
demo.getFloat().write(0, 0F);
|
||||
PacketContainer rain = ProtocolLibrary.getProtocolManager().createPacket(PacketType.Play.Server.GAME_STATE_CHANGE);
|
||||
rain.getBytes().write(0, (byte) 7);
|
||||
rain.getFloat().write(0, 5F);
|
||||
try {
|
||||
ProtocolLibrary.getProtocolManager().sendServerPacket(event.getPlayer(), demo);
|
||||
ProtocolLibrary.getProtocolManager().sendServerPacket(event.getPlayer(), rain);
|
||||
} catch (InvocationTargetException e) {
|
||||
throw new SecurityException("Screw this", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren