-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Might actually remove all code from this branch and only leave the development branch for code.. what do you guys think?
- Loading branch information
Showing
122 changed files
with
3,326 additions
and
1,634 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using UnityEngine; | ||
using static BP_Essentials.Variables; | ||
using static BP_Essentials.HookMethods; | ||
|
||
namespace BP_Essentials.Commands | ||
{ | ||
class Back | ||
{ | ||
public static void Run(SvPlayer player, string message) | ||
{ | ||
var lastLocation = PlayerList[player.player.ID].LastLocation; | ||
if (!lastLocation.HasPositionSet()) | ||
{ | ||
player.SendChatMessage($"<color={errorColor}>There is no location to teleport to.</color>"); | ||
return; | ||
} | ||
player.ResetAndSavePosition(lastLocation.Position, lastLocation.Rotation, lastLocation.PlaceIndex); | ||
player.SendChatMessage($"<color={infoColor}>You've been teleported to your last known location.</color>"); | ||
} | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,29 @@ | ||
using System; | ||
using static BP_Essentials.EssentialsVariablesPlugin; | ||
using static BP_Essentials.Variables; | ||
namespace BP_Essentials.Commands { | ||
public class Ban | ||
{ | ||
public static void Run(SvPlayer player, string message) | ||
{ | ||
var arg1 = GetArgument.Run(1, false, false, message); | ||
var arg2 = GetArgument.Run(2, false, true, message); | ||
if (!string.IsNullOrEmpty(arg1) && !string.IsNullOrEmpty(arg2)) | ||
{ | ||
var shPlayer = GetShByStr.Run(arg1, true); | ||
if (shPlayer == null) | ||
{ | ||
player.Send(SvSendType.Self, Channel.Unsequenced, ClPacket.GameMessage, NotFoundOnlineIdOnly); | ||
return; | ||
} | ||
LogMessage.LogOther($"{SetTimeStamp.Run()}[INFO] {shPlayer.username} Got banned by {player.playerData.username} (Reason: {arg2}"); | ||
player.Send(SvSendType.All, Channel.Unsequenced, ClPacket.GameMessage, $"<color={argColor}>{shPlayer.username}</color> <color={warningColor}>Just got banned by</color> <color={argColor}>{player.playerData.username}</color> <color={warningColor}>(Reason: </color><color={argColor}>{arg2}</color><color={warningColor}>)</color>"); | ||
SendDiscordMessage.BanMessage(shPlayer.username, player.playerData.username, arg2); | ||
player.Send(SvSendType.Self, Channel.Unsequenced, ClPacket.GameMessage, $"<color={infoColor}>Banned</color> <color={argColor}>{shPlayer.username}</color><color={infoColor}>. (Reason: {arg2})</color>"); | ||
player.svManager.AddBanned(shPlayer); | ||
player.svManager.Disconnect(shPlayer.svPlayer.connection); | ||
} | ||
else | ||
player.Send(SvSendType.Self, Channel.Unsequenced, ClPacket.GameMessage, ArgRequired); | ||
} | ||
public static void Run(SvPlayer player, string message) | ||
{ | ||
var arg1 = GetArgument.Run(1, false, false, message); | ||
var arg2 = GetArgument.Run(2, false, true, message); | ||
if (string.IsNullOrEmpty(arg1) || string.IsNullOrEmpty(arg2)) | ||
{ | ||
player.SendChatMessage(ArgRequired); | ||
return; | ||
} | ||
var shPlayer = GetShByStr.Run(arg1, true); | ||
if (shPlayer == null) | ||
{ | ||
player.SendChatMessage(NotFoundOnlineIdOnly); | ||
return; | ||
} | ||
LogMessage.LogOther($"{PlaceholderParser.ParseTimeStamp()} [INFO] {shPlayer.username} Got banned by {player.playerData.username} (Reason: {arg2}"); | ||
player.Send(SvSendType.All, Channel.Unsequenced, ClPacket.GameMessage, $"<color={argColor}>{shPlayer.username}</color> <color={warningColor}>Just got banned by</color> <color={argColor}>{player.playerData.username}</color> <color={warningColor}>(Reason: </color><color={argColor}>{arg2}</color><color={warningColor}>)</color>"); | ||
SendDiscordMessage.BanMessage(shPlayer.username, player.playerData.username, arg2); | ||
player.SendChatMessage($"<color={infoColor}>Banned</color> <color={argColor}>{shPlayer.username}</color><color={infoColor}>. (Reason: {arg2})</color>"); | ||
player.svManager.AddBanned(shPlayer); | ||
player.svManager.Disconnect(shPlayer.svPlayer.connection, DisconnectTypes.Banned); | ||
} | ||
} | ||
} |
Oops, something went wrong.