@@ -113,7 +113,17 @@ public void addExperiencesCommand(CommandIssuer executor, OnlineOtherPlayer targ
113113 @ Subcommand ("skill" )
114114 @ CommandCompletion ("@skilltree @nothing @skillskctx" )
115115 public void adminExecuteSkillCommand (IActiveCharacter character , SkillTree tree , int level , ISkill skill ) {
116+ long e = System .nanoTime ();
116117 commandExecuteSkill (character , tree , skill , level );
118+ if (Rpg .get ().getPluginConfig ().DEBUG .isBalance ()) {
119+ character .sendMessage ("Exec Time: " + TimeUnit .MILLISECONDS .convert (e - System .currentTimeMillis (), TimeUnit .NANOSECONDS ));
120+ }
121+ }
122+
123+ @ Subcommand ("cast-skill-as" )
124+ @ CommandCompletion ("@skilltree @nothing @skillskctx" )
125+ public void adminExecuteSkillCommandAs (OnlineOtherPlayer executor , SkillTree tree , int level , ISkill skill ) {
126+ commandExecuteSkill (executor .character , tree , skill , level );
117127 }
118128
119129 @ Subcommand ("classes" )
@@ -353,17 +363,12 @@ public void commandExecuteSkill(IActiveCharacter character, SkillTree skillTree,
353363
354364 SkillResult result = Rpg .get ().getSkillService ().executeSkill (character , playerSkillContext );
355365
356- long e = System .nanoTime ();
357366 if (result == SkillResult .OK ) {
358367 SkillPostUsageEvent eventPost = Rpg .get ().getEventFactory ().createEventInstance (SkillPostUsageEvent .class );
359368 eventPost .setSkill (skill );
360369 eventPost .setCaster (character );
361370 Rpg .get ().postEvent (eventPost );
362371 }
363- if (Rpg .get ().getPluginConfig ().DEBUG .isBalance ()) {
364- character .sendMessage ("Exec Time: " + TimeUnit .MILLISECONDS .convert (e - l , TimeUnit .NANOSECONDS ));
365- }
366-
367372 }
368373
369374 public void commandAddUniqueSkillpoint (IActiveCharacter character , String classType , String sourceKey ) {
0 commit comments