1+ using CommandSystem ;
2+ using Exiled . API . Features . Pickups ;
3+ using System ;
4+
5+ namespace MyPlugin . Commands
6+ {
7+ using System ;
8+ using System . Linq ;
9+ using CommandSystem ;
10+
11+ using Exiled . API . Features ;
12+ using Exiled . API . Features . Pickups ;
13+ using MapEditorReborn . API . Features ;
14+ using MapEditorReborn . API . Features . Objects ;
15+ using UnityEngine ;
16+
17+ /// <summary>
18+ /// This is an example of how commands should be made.
19+ /// </summary>
20+ [ CommandHandler ( typeof ( ClientCommandHandler ) ) ]
21+ public class Clipboard : ICommand
22+ {
23+ /// <inheritdoc/>
24+ public string Command { get ; } = "clipboard" ;
25+
26+ /// <inheritdoc/>
27+ public string [ ] Aliases { get ; } = new [ ] { "cb" } ;
28+
29+ /// <inheritdoc/>
30+ public string Description { get ; } = "Animace clipboard" ;
31+
32+ /// <inheritdoc/>
33+ public bool Execute ( ArraySegment < string > arguments , ICommandSender sender , out string response )
34+ {
35+ //This serves only purpose for .me / .m registration and it does nothing
36+ //.me is meant to be alone normal command but I do not yet know how to do that
37+ //next update I will change this
38+
39+
40+ Player player = Player . Get ( sender ) ;
41+ /*
42+
43+
44+ if (player == null)
45+ {
46+ response = "This command must be from the game level.";
47+ return false;
48+ }
49+
50+ if (MyPlugin.Instance.SchematicsToDestroyCommand.TryGetValue(player, out SchematicObject schematic))
51+ {
52+ //player.Broadcast(1, "You picked up test item whooo");
53+ if (schematic != null)
54+ {
55+ schematic.Destroy();
56+ }
57+
58+ }
59+
60+ SchematicObject mySchematicsVar = ObjectSpawner.SpawnSchematic("Clipboard", player.Position, player.Rotation, new Vector3(1, 1, 1), null, false);
61+ mySchematicsVar.transform.parent = player.Transform;
62+ MyPlugin.Instance.SchematicsToDestroyCommand[player] = mySchematicsVar;
63+ /O
64+ This will have all the arguments and I can check what the fuck is happening
65+ string myarguments = string.Join(" ", arguments);
66+ if (myarguments == "suspicous stew") { }
67+ O/
68+ //------------>
69+
70+
71+ //-Return true if the command was executed successfully; otherwise, false.-
72+ //------------<
73+ */
74+ response = $ "{ player . Nickname } run alone .me";
75+ return true ;
76+ }
77+ }
78+ }
0 commit comments