mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-23 04:32:50 -04:00
tp/summon shouldn't change rotx/rotz
This commit is contained in:
parent
bb682d7457
commit
88b7a725fc
@ -55,9 +55,9 @@ namespace MCGalaxy.Commands {
|
|||||||
if (receiver == null) return;
|
if (receiver == null) return;
|
||||||
|
|
||||||
if (Player.IsSuper(p)) {
|
if (Player.IsSuper(p)) {
|
||||||
receiver.SendMessage("Message recieved from " + senderNick + "%S.");
|
Player.Message(receiver, "Message recieved from " + senderNick + "%S.");
|
||||||
} else {
|
} else if (Chat.NotIgnoring(p, receiver)) {
|
||||||
p.MessageTo(receiver, "Message recieved from " + senderNick + "%S.");
|
Player.Message(receiver, "Message recieved from " + senderNick + "%S.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,9 +63,11 @@ namespace MCGalaxy.Commands {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void ShowRequestMessage(Player p, Player target) {
|
static void ShowRequestMessage(Player p, Player target) {
|
||||||
p.MessageTo(target, p.ColoredName + " %Swould like to teleport to you.");
|
if (!Chat.NotIgnoring(p, target)) return;
|
||||||
p.MessageTo(target, "Type &2/tpaccept %Sor &4/tpdeny%S.");
|
|
||||||
p.MessageTo(target, "This request will timeout after &b90 %Sseconds.");
|
Player.Message(target, p.ColoredName + " %Swould like to teleport to you.");
|
||||||
|
Player.Message(target, "Type &2/tpaccept %Sor &4/tpdeny%S.");
|
||||||
|
Player.Message(target, "This request will timeout after &b90 %Sseconds.");
|
||||||
}
|
}
|
||||||
|
|
||||||
void DoAccept(Player p) {
|
void DoAccept(Player p) {
|
||||||
|
@ -151,17 +151,6 @@ namespace MCGalaxy {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary> Sends a message to the target player, unless the
|
|
||||||
/// target player is ignoring this player. </summary>
|
|
||||||
/// <returns> Whether the target player is ignoring this player. </returns>
|
|
||||||
public bool MessageTo(Player other, string message) {
|
|
||||||
if (other.ignoreAll || other.listignored.CaselessContains(name)) return false;
|
|
||||||
other.SendMessage(message);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SendBlankMessage() { Send(Packet.BlankMessage()); }
|
|
||||||
|
|
||||||
public static void MessageLines(Player p, IEnumerable<string> lines) {
|
public static void MessageLines(Player p, IEnumerable<string> lines) {
|
||||||
foreach (string line in lines)
|
foreach (string line in lines)
|
||||||
SendMessage(p, line, true);
|
SendMessage(p, line, true);
|
||||||
@ -348,7 +337,7 @@ namespace MCGalaxy {
|
|||||||
/// <summary> Sends a packet indicating an absolute position + orientation change for an enity. </summary>
|
/// <summary> Sends a packet indicating an absolute position + orientation change for an enity. </summary>
|
||||||
public void SendPos(byte id, Position pos, Orientation rot) {
|
public void SendPos(byte id, Position pos, Orientation rot) {
|
||||||
if (id == Entities.SelfID) {
|
if (id == Entities.SelfID) {
|
||||||
Pos = pos; Rot = rot;
|
Pos = pos; SetYawPitch(rot.RotY, rot.HeadX);
|
||||||
pos.Y -= 22; // NOTE: Fix for standard clients
|
pos.Y -= 22; // NOTE: Fix for standard clients
|
||||||
}
|
}
|
||||||
Send(Packet.Teleport(id, pos, rot));
|
Send(Packet.Teleport(id, pos, rot));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user