Compare commits
2 Commits
b1fa25fb1d
...
a285e31175
Author | SHA1 | Date | |
---|---|---|---|
a285e31175 | |||
f5adebb13f |
@ -266,13 +266,15 @@ defmodule Amethyst.Server.Configuration do
|
|||||||
Logger.error("Unhandled but known packet #{elem(tuple, 0)}")
|
Logger.error("Unhandled but known packet #{elem(tuple, 0)}")
|
||||||
{:unhandled, state}
|
{:unhandled, state}
|
||||||
end
|
end
|
||||||
defp handle_plugin_message("minecraft:brand", data, _client, state) do
|
defp handle_plugin_message("minecraft:brand", data, client, state) do
|
||||||
{[brand], ""} = Read.start(data) |> Read.string |> Read.stop
|
{[brand], ""} = Read.start(data) |> Read.string |> Read.stop
|
||||||
Logger.info("Client using brand: #{brand}")
|
Logger.info("Client using brand: #{brand}")
|
||||||
|
transmit({:clientbound_plugin_message, "minecraft:brand", "amethyst"}, client)
|
||||||
{:ok, Keyword.put(state, :brand, brand)}
|
{:ok, Keyword.put(state, :brand, brand)}
|
||||||
end
|
end
|
||||||
defp handle_plugin_message("amethyst:hello", _data, _client, state) do
|
defp handle_plugin_message("amethyst:hello", _data, client, state) do
|
||||||
Logger.info("Client is Amethyst aware! Hello!")
|
Logger.info("Client is Amethyst aware! Hello!")
|
||||||
|
transmit({:clientbound_plugin_message, "amethyst:hello", ""}, client)
|
||||||
{:ok, Keyword.put(state, :knows_amethyst, true)}
|
{:ok, Keyword.put(state, :knows_amethyst, true)}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user