internal static bool RaiseCommandCallingEvent([NotNull] CommandReader cmd, [NotNull] Player player) { var h = CommandCalling; if (h == null) return false; var e = new CommandCallingEventArgs(cmd, player); h(null, e); return e.Cancel; }
internal static bool RaiseCommandCallingEvent( Command cmd, CommandDescriptor descriptor, Player player ) { var h = CommandCalling; if ( h == null ) return false; var e = new CommandCallingEventArgs( cmd, descriptor, player ); h( null, e ); return e.Cancel; }
private static void CommandCalling( object sender, CommandCallingEventArgs e ) { if ( e.Player.World == null ) return; Command cmd = e.Command; if ( cmd == null ) return; if ( Cache.ForbiddenCommands.Contains( cmd.Name.ToLower() ) ) { e.Player.Message( "Use of this command is forbidden when running Au70 Guilds" ); e.Cancel = true; } }